
Die folgende Bedingung führt beim Abgleichen eines Benutzeragenten mit der Teilzeichenfolge „MSIE 8“ zu einer 404-Weiterleitung?
#Begin IE8 Hack if ($http_user_agent ~* 'MSIE 8') { #set $hack "I"; } #End IE8 Hack
Durch das Auskommentieren if ($http_user_agent...
wird die 404-Weiterleitung gestoppt.
Was ist denn hier los?
Curl-Anforderung
curl -XGET 'https://localhsot/[email geschützt]' -v -A'Mozilla/4.0 (kompatibel; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MDDSJS)'
Umfeld
- NGINX 1.6.2
- Linux Debian 7 3.2.0-4-amd64
Vollständige Konfiguration
server {
listen 80 default_server;
root /var/www/frontend;
#Begin IE8 Hack
error_page 418 = @PATCH;
location @PATCH {
proxy_method PATCH;
proxy_pass http://0.0.0.0:3001;
proxy_redirect default;
}
#End IE8 Hack
location / {
#Begin IE8 Hack
if ($http_user_agent ~* 'MSIE 8') {
#set $hack "I";
}
#if ($request_method = PUT) {
# set $hack "${hack}E";
#}
#if ($hack = IE) {
# return 418;
#}
#End IE8 Hack
proxy_pass http://0.0.0.0:3001/v1/;
proxy_redirect default;
}
}