Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added RAILS_URL_PROTOCOL #207

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading