Can someone help us to add calling origin in NGINX header?
We need to whitelist calling origin on the basis of the origin (from where the request originated/triggered)
location /some_filter_url {
proxy_pass http://test-domain.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Origin {????? What should be used $http-origin is null};
}
variable $http-origin giving us the value null while $host giving the current/original host.
Any Help will be appreciated. TIA.
It is $http_origin
with an underscore and not the dash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With