As per Nginx documentation, the key directives of proxy_http_version
and proxy_set_header
need to be set as per below:
upstream backend {
server 127.0.0.1:8080;
keepalive 8;
}
server {
listen 80;
location / {
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}