Валентин Бартенев Wrote: ------------------------------------------------------- > Вы цитируете устаревший RFC, да ещё часть про роутинг, а не про > корректность. > > На самом деле: http://tools.ietf.org/html/rfc7230#section-5.4 > > A server MUST respond with a 400 (Bad Request) status code to any > HTTP/1.1 request message that lacks a Host header field and to any > request message that contains more than one Host header field or a > Host header field with an invalid field-value.
А если у меня nginx является фронтэндом к локальному апачу, он считается "прокси"? :) When a proxy receives a request with an absolute-form of request-target, the proxy MUST ignore the received Host header field (if any) and instead replace it with the host information of the request-target. A proxy that forwards such a request MUST generate a new Host field-value based on the received request-target rather than forward the received Host field-value. > > Есть какая-либо возможность настроить nginx так, чтобы он не выдавал > ошибку > > 400? > > Нет. > Очень негибко... Я уже собрал nginx с поддержкой lua - проверить, передает ли nginx заголовки в header_filter_by_lua ДО отказа клиенту... ан нет, не вышло... Остается только исходники nginx'а править? Posted at Nginx Forum: http://forum.nginx.org/read.php?21,253091,253094#msg-253094 _______________________________________________ nginx-ru mailing list nginx-ru@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-ru