Welcome! Log In Create A New Profile

Advanced

Content-Type

Posted by Mihail Dverin 
Content-Type
March 24, 2012 04:39AM
Имеем простейшую конфигурацию проксирования запросов на backend:

server {
location / {
proxy_pass http://x.x.x.x;
}
}

Каким образом можно проверить содержимое header'а "Content-Type" в ответе от backend'а?

Конструкции вида:

server {
location / {
proxy_pass http://x.x.x.x;

if ($content_type = text/plain) {
return 404;
}

if ($upstream_http_content_type = text/plain) {
return 404;
}
}
}

Не работают.
Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 68
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready