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 c219819 commit 8a399ff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/ret_web/controllers/page_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,15 @@ defmodule RetWeb.PageController do

resolved_ip = HttpUtils.resolve_ip(host)

IO.inspect(resolved_ip)
IO.inspect(System.get_env("TURKEY_MODE"))
IO.inspect(cors_host)

Check failure on line 679 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:679: undefined function cors_host/0 (expected RetWeb.PageController to define such a function or for it to be imported, but none are available)
IO.inspect(conn.host)
IO.inspect(cors_scheme)
IO.inspect(get_req_header(conn, "x-forwarded-proto"))

if HttpUtils.internal_ip?(resolved_ip) do
conn |> send_resp(401, "Bad request.")
conn |> send_resp(401, "Bad request")
else
# We want to ensure that the URL we request hits the same IP that we verified above,
# so we replace the host with the IP address here and use this url to make the proxy request.
Expand Down

0 comments on commit 8a399ff

Please sign in to comment.