Skip to content

Commit

Permalink
fix(force_ssl): Configure force_ssl in prod instead of runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
kotva006 committed May 6, 2024
1 parent 5d956ea commit 24f08b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 10 additions & 0 deletions config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@ import Config

config :dotcom, :cache, Dotcom.Cache.Multilevel
config :dotcom, :trip_plan_feedback_cache, Dotcom.Cache.TripPlanFeedback.Cache

unless System.get_env("PORT") do
# configured separately so that we can have the health check not require
# SSL
config :dotcom, :secure_pipeline,
force_ssl: [
host: nil,
rewrite_on: [:x_forwarded_proto]
]
end
10 changes: 0 additions & 10 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,6 @@ if config_env() == :prod do
port: System.get_env("STATIC_PORT")
]

unless System.get_env("PORT") do
# configured separately so that we can have the health check not require
# SSL
config :dotcom, :secure_pipeline,
force_ssl: [
host: nil,
rewrite_on: [:x_forwarded_proto]
]
end

config :dotcom,
support_ticket_to_email: System.get_env("SUPPORT_TICKET_TO_EMAIL"),
support_ticket_from_email: System.get_env("SUPPORT_TICKET_FROM_EMAIL"),
Expand Down

0 comments on commit 24f08b4

Please sign in to comment.