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 a471b50 commit 0b14c1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ret_web/controllers/page_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ defmodule RetWeb.PageController do
IO.puts(cors_host, conn.host, compare_hosts(cors_host, conn.host) )
IO.puts(cors_scheme, get_req_header(conn, "x-forwarded-proto") |> Enum.at(0) )

compare_hosts(cors_host, conn.host) &&
compare_hosts(conn.host, cors_host) &&
cors_scheme == get_req_header(conn, "x-forwarded-proto") |> Enum.at(0)

else
Expand Down Expand Up @@ -744,9 +744,9 @@ defmodule RetWeb.PageController do
IO.puts("host1: #{host1}, host2: #{host2}")
IO.puts(String.split(host1, ".", parts: -1) |> Enum.slice(0..-2) |> Enum.join("."))
IO.puts(String.split(host2, ".", parts: -1) |> Enum.slice(0..-2) |> Enum.join("."))
host1 == host2 || (List.last(String.split(host2, ".")) == "dev" &&
String.split(host1, ".", parts: -1) |> Enum.slice(0..-2) |> Enum.join(".") ==
String.split(host2, ".", parts: -1) |> Enum.slice(0..-2) |> Enum.join("."))
host1 == host2 ||
(host2 |> String.split(".") |> List.last()) == "dev"
&& host1 |> String.split(".") |> Enum.slice(0..-2) == host2 |> String.split(".") |> Enum.slice(0..-2)
end

defp render_static_asset(conn) do
Expand Down

0 comments on commit 0b14c1b

Please sign in to comment.