From c21981905ec5f1b2c6c0f95d09bc01430e7d5ad3 Mon Sep 17 00:00:00 2001 From: tanfarming Date: Wed, 22 Nov 2023 11:51:39 -0500 Subject: [PATCH] word --- lib/ret_web/controllers/page_controller.ex | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/ret_web/controllers/page_controller.ex b/lib/ret_web/controllers/page_controller.ex index 82fb3b595..50903288d 100644 --- a/lib/ret_web/controllers/page_controller.ex +++ b/lib/ret_web/controllers/page_controller.ex @@ -687,14 +687,15 @@ defmodule RetWeb.PageController do [cors_scheme, cors_port, cors_host] = [:scheme, :port, :host] |> Enum.map(&Keyword.get(cors_proxy_url, &1)) + + IO.inspect(System.get_env("TURKEY_MODE")) + IO.inspect(cors_host) + IO.inspect(conn.host) + IO.inspect(cors_scheme) + IO.inspect(get_req_header(conn, "x-forwarded-proto")) + is_cors_proxy_url = - if System.get_env("TURKEY_MODE") do - - IO.inspect(cors_host) - IO.inspect(conn.host) - IO.inspect(cors_scheme) - IO.inspect(get_req_header(conn, "x-forwarded-proto")) - + if System.get_env("TURKEY_MODE") do cors_host == conn.host && cors_scheme == get_req_header(conn, "x-forwarded-proto") |> Enum.at(0) else