How to set X-Forwarded-Proto header in nginx
Directly after any proxy_pass
line add
proxy_set_header X-Forwarded-Proto $scheme;
Typically X-Forwarded-Proto
is used together with X-Forwarded-Host
like this:
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow