I wonder what is difference between them. In my case I want to redirect all http request https, so I want to add some config like this:
if ($scheme = 'http') { return 301 https://$host$request_uri; }
But unfortunately it's just not working, even I do access it with http not https. When I change to use $http_x_forwarded_proto, its just working
$http_x_forwarded_proto
1.4m articles
1.4m replys
5 comments
57.0k users