John ORourke wrote:
Hi folks,
The underlying reason for this is that I have a reverse proxy in front
of it, which proxies HTTP and HTTPS requests. The back-end needs to
create self-referencing URLs but cannot tell if it's HTTP or HTTPS, so I
decided to direct HTTP to port 81 and HTTPS to port 82. I'd prefer to
do it by adding a request header so if someone knows a way to do that
please let me know!
I stole this strategy from the Rails folks: on the frontend https, add this
line:
RequestHeader set X_FORWARDED_PROTO 'https'
On the backend, you can then test for $ENV{X_FORWARDED_PROTO}.
Rhesa