Update nginx.tmpl

Set proxy header "Connection: keep-alive" if upstream-keepalive-connections greater then 0.
This commit is contained in:
Anton Fayzrahmanov 2017-11-23 11:54:53 +03:00 committed by GitHub
parent dcf4a4595e
commit 9a21482e9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,7 +171,7 @@ http {
# Retain the default nginx handling of requests without a "Connection" header
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
'' {{ if (gt $cfg.UpstreamKeepaliveConnections 0) }}keep-alive{{ else }}close{{ end }};
}
map {{ buildForwardedFor $cfg.ForwardedForHeader }} $the_real_ip {