2016-09-01 1 views
0

클라이언트의 Accept-* 요청 헤더에 관계없이 gzip을 비활성화해야하는 경우가 있습니다.Nginx에 Gzip 적용 안 함

내 Nginx에의 conf의 항목은 다음 지시했습니다, 응답 서버는 프록시됩니다

< HTTP/1.1 200 OK 
< Cache-Control: no-cache, no-store, private 
< Content-Encoding: gzip 
< Content-Type: text/html;charset=utf-8 
< Date: Thu, 01 Sep 2016 07:13:30 GMT 
< Expires: -1 
< Server: Reblaze Secure Web Gateway 
< Set-Cookie: ... 
< Set-Cookie: ... 
< Set-Cookie: ... 
< Set-Cookie: ... 
< Set-Cookie: ... 
< Set-Cookie: ... 
< Set-Cookie: ... 
< Vary: User-Agent 
< Content-Length: 55455 
< Connection: keep-alive 

참고 : 그러나

gzip off; 

more_clear_input_headers -t 'text/html' Accept Accept-Encoding; 

proxy_set_header Accept ""; 
proxy_set_header Accept-Encoding ""; 

, 다음 컬 :와

curl '$URL' 
-H 'Pragma: no-cache' 
-H 'Accept-Encoding: gzip, deflate, sdch' 
-H 'Accept-Language: en-US,en;q=0.8,he;q=0.6' 
-H 'Upgrade-Insecure-Requests: 1' 
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36' 
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' 
-H 'Cache-Control: no-cache' 
-H 'Cookie: "$COOKIE"' 
-H 'Connection: keep-alive' -v > /dev/null 

결과 이 Nginx.

+0

conf를 포함하십시오. –

답변