Skip to content

Commit

Permalink
word
Browse files Browse the repository at this point in the history
  • Loading branch information
tanfarming committed Nov 22, 2023
1 parent 31bdbea commit a4eec00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ret_web/controllers/page_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,10 @@ defmodule RetWeb.PageController do

is_cors_proxy_url =
if System.get_env("TURKEY_MODE") do
cors_host == conn.host &&
cors_scheme == get_req_header(conn, "x-forwarded-proto") |> Enum.at(0)
sameScheme=cors_scheme == get_req_header(conn, "x-forwarded-proto") |> Enum.at(0)
# sameHost=cors_host == conn.host
String.split(conn.host, ".", parts: -1) |> Enum.slice(0..-2) |> Enum.join(".") == String.split(cors_host, ".", parts: -1) |> Enum.slice(0..-2) |> Enum.join(".")
sameScheme&&sameHost

Check failure on line 695 in lib/ret_web/controllers/page_controller.ex

View workflow job for this annotation

GitHub Actions / lint-and-test

** (CompileError) lib/ret_web/controllers/page_controller.ex:695: undefined function sameHost/0 (expected RetWeb.PageController to define such a function or for it to be imported, but none are available)
else
cors_scheme == Atom.to_string(conn.scheme) && cors_host == conn.host &&
cors_port == conn.port
Expand Down

0 comments on commit a4eec00

Please sign in to comment.