Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Proxy_protocol, how to check protocol or port (not only remote IP)

$
0
0
I am having the same problem - I need to detect if the connection is using SSL or not.

I used to use

if ($http_x_forwarded_proto = "http") { return 301 https://$host$request_uri; }

but now I switched to proxy_protocol and I'm not seeing a way to detect if SSL is being used. It seems there should be a $proxy_prototcol_proto and/or $proxy_prototcol_port variables but they don't seem to exist.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>