You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Rack::Request#url` includes the port of the original request (despite
accurate scheme updates). This becomes an issue when LB terminates SSL:
- client request is made to https://example.com:443,
- LB request is http://example.com:80
- build_api_url returns correct scheme but wrong port:
https://example:80
Since we only need the request url from the env, this changeset manually
fetches the correct scheme (Rack accounts for FWD headers already), the
host (w/out port as opposed to #host_with_port), and the fullpath
(pathname + query params)
Another benefit of this changeset is that it no longer mutates the
original env object (assigning to `new_env` is by reference).
Caveat: im dropping @options[:protocol] bc there's x-fwd-proto should
handle this already.
0 commit comments