Apache有一个补丁来阻止Internet Explorer 10的Do Not Track头。我可以使用什么Nginxconfiguration更改来执行相同的操作?
当nginx是上游后端服务器的反向代理时,请使用proxy_set_header ,如下所示:
proxy_set_header DNT ""
在发送到FastCGI / FPM时,比如在PHP的情况下,使用fastcgi_hide_header ,例如:
fastcgi_hide_header DNT
请记住,你将不得不包裹在一个iftestingIE 10, 如果是邪恶的 ,所以这个configuration可能会回来咬你。 如果你只有一个, if在location块,你可能会好的…
if ($http_user_agent ~ Trident/6.0) { proxy_set_header DNT "" }