From 9a02331e021850debc16ecc0ce4ba40d5bdbe642 Mon Sep 17 00:00:00 2001 From: Anthony Shull Date: Thu, 9 May 2024 10:34:23 -0500 Subject: [PATCH] Forward static file requests to the CDN (#2045) * dev and prod behave differently * unused var --- lib/cms/api.ex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/cms/api.ex b/lib/cms/api.ex index 55fef29707..69a0d37317 100644 --- a/lib/cms/api.ex +++ b/lib/cms/api.ex @@ -85,9 +85,8 @@ defmodule CMS.Api do defp set_redirect_options(uri) do base_url = Application.get_env(:dotcom, :cms_api)[:base_url] - file_path = "/sites/default/files" - if String.contains?(base_url, uri.host) and not String.contains?(uri.path, file_path) do + if String.contains?(base_url, uri.host) do [to: uri |> internal_uri() |> parse_redirect_query()] else [external: parse_redirect_query(uri)]