Enable assume_ssl for reverse proxy HTTPS callback URLs #155
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "154-enable-assume-ssl"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
config.assume_sslso Rails trusts X-Forwarded-Proto from the Tailscale funnel reverse proxyhttp://callback URLs which Keycloak rejects as invalid_redirect_uriCloses #154
Changes
config/environments/production.rb: Uncommentconfig.assume_ssl = true(line 28)Test Plan
Review Checklist
Related Notes
PR Review: #155 — Enable assume_ssl for reverse proxy HTTPS callback URLs
Parent issue: #154
Diff Analysis
Single-line change in
config/environments/production.rb: uncommentsconfig.assume_ssl = true.Findings
Correctness: The change is correct.
config.assume_sslis the standard Rails 7.1+ mechanism for apps behind SSL-terminating reverse proxies. It makes Rails trustX-Forwarded-ProtoandX-Forwarded-Portheaders, ensuringrequest.ssl?returns true and URL helpers generatehttps://URLs. This directly fixes the OmniAuthinvalid_redirect_urierror where callback URLs were being built withhttp://instead ofhttps://.Scope: Minimal and appropriate. One line, production config only. No test changes needed since this is infrastructure configuration, not application logic.
Risk: Very low. The app is confirmed to run behind a Tailscale funnel (SSL-terminating proxy), so enabling this setting matches the actual deployment topology.
No issues found.
VERDICT: APPROVED
Pull request closed