add keepalive to upstream directive (hard code in template)

This commit is contained in:
Alireza David 2016-10-28 12:53:17 +03:30
parent 0670a13d92
commit 804f07612d

View file

@ -47,7 +47,7 @@ proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
@ -101,6 +101,8 @@ upstream {{ $host }} {
{{ end }}
{{ end }}
{{ end }}
keepalive 10;
}
{{ $default_host := or ($.Env.DEFAULT_HOST) "" }}