Skip to content

Commit

Permalink
Some more testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kotva006 committed May 6, 2024
1 parent d7c7c5f commit 30bfed6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/dotcom_web/plugs/debug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ defmodule DotcomWeb.Plugs.Debug do

@impl Plug
def call(conn, _) do
Logger.info("#{@pipeline} **************************")
if Enum.member?(@pipeline) do
Logger.info(
"#{Enum.map_join(@pipeline, "&", fn {k, v} -> "#{k}:#{v}" end)} **************************"
)
end

conn
end
end
6 changes: 5 additions & 1 deletion lib/dotcom_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ defmodule DotcomWeb.Router do

if force_ssl = Application.compile_env(:dotcom, :secure_pipeline)[:force_ssl] do
Logger.info("Force SSL is Called")
plug(Plug.SSL, force_ssl)

plug(Plug.SSL,
host: nil,
rewrite_on: [:x_forwarded_proto]
)
end
end

Expand Down

0 comments on commit 30bfed6

Please sign in to comment.