disabling gzip if etag exists in proxy_pass response

只愿长相守 提交于 2020-01-03 20:57:26

问题


I'm new to nginx.

Is there a way to disable gzip if proxy_pass reutrns the ETag header.

I.E:

gzip on;
.
.
.

    location /foo/bar {
      proxy_pass http://server:123;

      if ($upstream_http_etag) {
         gzip off;
      }
    }

Basically I'm looking for a workaround to this bug that will disable the gzip compression if server responded with etag header.

http://trac.nginx.org/nginx/ticket/377

Thank you, Vitaly


回答1:


There is now, gzip_proxied has no_etag parameter:

gzip on;
gzip_proxied no_etag;

The bug is closed, too.



来源:https://stackoverflow.com/questions/24554920/disabling-gzip-if-etag-exists-in-proxy-pass-response

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!