Skip to content

Commit

Permalink
Merge pull request #207 from mlibrary/env_var_for_rails_protocol
Browse files Browse the repository at this point in the history
Added RAILS_URL_PROTOCOL
  • Loading branch information
botimer authored Sep 23, 2024
2 parents 387135c + 12cb9ed commit 15abcb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

if Dromedary::Services[:rails_url_host]
Rails.application.routes.default_url_options[:host] = Dromedary::Services[:rails_url_host]
Rails.application.routes.default_url_options[:protocol] = Dromedary::Services[:rails_url_protocol]
end

Rails.application.routes.draw do
Expand Down
2 changes: 1 addition & 1 deletion lib/dromedary/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Dromedary
# running with the proxy handlers and don't explicitly set the path, it borks.

Services.register(:rails_url_host) { ENV["RAILS_URL_HOST"] || nil }

Services.register(:rails_url_protocol) { ENV["RAILS_URL_PROTOCOL"] || nil } }


#### NAMING ####
Expand Down

0 comments on commit 15abcb4

Please sign in to comment.