-Поиск по дневнику

Поиск сообщений в rss_planet_mozilla

 -Подписка по e-mail

 

 -Постоянные читатели

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 19.06.2007
Записей:
Комментариев:
Написано: 7


Nigel Babu: Weird IE8 error. Nginx to the rescue!

Вторник, 04 Ноября 2014 г. 05:22 + в цитатник

As a server side developer, I don’t run into IE-specific errors very often. Last month, I ran into a very specific error, which is spectacular by itself. IE8 does not like downloads with cache control headers. The client has plenty of IE8 users and preferred we serve over HTTP for IE8 so that the site worked for sure.

Nginx has a very handy module called ngx_http_browser_module to help! All that I needed to do was less than 10 lines of Nginx config.

location / {
    # every browser is to be considered modern
    modern_browser unlisted;
    # these particular browsers are ancient
    ancient_browser "MSIE 6.0" "MSIE 7.0" "MSIE 8.0";
    # redirect to HTTP if ancient
    if ($ancient_browser) {
        return 301 http://$server_name$request_uri;
    }
    # handle requests that are not redirected
    proxy_pass http://127.0.0.1:8080;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
}
It's Magic GIF

Yet another day I’m surprised by Nginx :)

http://nigelb.me/2014-11-04-ie8-ssl-woes-and-nginx-superhero.html


 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку