Disable gzip on HEAD requests in v2
endpoints
nginx's gzip module will ignore the content-length header on the HEAD request and try to gzip the body.... but there is no body, so it simply writes no header at all. Code to turn this off was based off of https://trac.nginx.org/nginx/ticket/261
This commit is contained in:
parent
105acbc041
commit
bf51ec20e8
1 changed files with 4 additions and 0 deletions
|
@ -105,6 +105,10 @@ location ~ ^/v2 {
|
|||
return 404;
|
||||
}
|
||||
|
||||
if ($request_method = HEAD ) {
|
||||
gzip off;
|
||||
}
|
||||
|
||||
# Setting ANY header clears all inherited proxy_set_header directives
|
||||
proxy_set_header X-Forwarded-For $proper_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $proper_scheme;
|
||||
|
|
Reference in a new issue