Skip to content

Conversation

@dhh
Copy link
Member

@dhh dhh commented Jan 25, 2023

NGINX and other SSL-terminating reverse proxies can use HTTP headers to include forwarding information. If your stack includes SSL-termination through a network load balancer, that won't happen. You can use config.assume_ssl to address that.

NGINX and other SSL-terminating reverse proxies can use HTTP headers to include forwarding information. If your stack includes SSL-termination through a network load balancer, that won't happen. You can use config.assume_ssl to address that.
@rails-bot rails-bot bot added the docs label Jan 25, 2023
@dhh dhh merged commit 1da6f8c into main Jan 25, 2023
@dhh dhh deleted the add-config-to-assume-ssl branch January 25, 2023 20:02
@webdz9r
Copy link

webdz9r commented Apr 4, 2023

This feature seems to not work or I don't understand how it works. In production I have nginx proxy to rails (puma) errors and I'm seeing theses errors with any request that's not _GET
HTTP Origin header (https://domain.com) didn't match request.base_url

nginx is available on 80 and 443 and proxy to puma cluster on 3000

sampoder pushed a commit to hackclub/hcb that referenced this pull request Mar 22, 2025
rails/rails#47139 for Hetzner load balancer, but
not necessary for Heroku. Must ensure that firewall is properly
configured so that clients can't directly access app servers (and must
go through load balancer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants