如何在NGINX中获取呼叫来源

如何在NGINX中获取呼叫来源,nginx,nginx-reverse-proxy,nginx-config,Nginx,Nginx Reverse Proxy,Nginx Config,有人能帮我们在NGINX头中添加呼叫来源吗 我们需要根据来源(请求的来源/触发地)将调用来源列入白名单 变量$http origin为我们提供值null,而$host为当前/原始主机提供值 任何帮助都将不胜感激。 TIA。它是带有下划线而不是破折号的$http\u origin。感谢Danila Vershinin,但变量$http\u origin会产生相同的结果 location /some_filter_url { proxy_pass http://tes

有人能帮我们在NGINX头中添加呼叫来源吗

我们需要根据来源(请求的来源/触发地)将调用来源列入白名单

变量$http origin为我们提供值null,而$host为当前/原始主机提供值

任何帮助都将不胜感激。
TIA。

它是带有下划线而不是破折号的
$http\u origin

感谢Danila Vershinin,但变量$http\u origin会产生相同的结果
    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};
    }