Hello all ! )
I have a some problem and can't find any working decision for it.
The problem is follow:
we have some portal working under JBOSS and we use NGINX as front-end. We configure NGINX for using keep-alive:
http{
...
keepalive_timeout 45 45;
keepalive_requests 1000;
...
}
and this is redirect configuration:
server{
...
location /our-portal/ {
proxy_pass http://127.0.0.1:8080;
break;
error_page 404 = @404;
error_page 502 = @502;
error_page 504 = @504;
}
...
}
I analized network dump and found out that response from proxy was without "Connection" header always. So.. proxy prepares response without Connection header. As a result - we get response from Nginx with header "Connection: close" always.
I tried to add more_set_headers 'connection: keep-alive' :
location /our-portal/ {
proxy_pass http://127.0.0.1:8080;
more_set_headers 'connection: keep-alive';
break;
error_page 404 = @404;
error_page 502 = @502;
error_page 504 = @504;
}
but in this case Nginx returns header "Connection : close, keep-alive" and I don't now how this will be recognized by various types of brousers.
What I need to do for result header "Connection : keep-alive" ? Is it possible in this case ?
Thank you!
I have a some problem and can't find any working decision for it.
The problem is follow:
we have some portal working under JBOSS and we use NGINX as front-end. We configure NGINX for using keep-alive:
http{
...
keepalive_timeout 45 45;
keepalive_requests 1000;
...
}
and this is redirect configuration:
server{
...
location /our-portal/ {
proxy_pass http://127.0.0.1:8080;
break;
error_page 404 = @404;
error_page 502 = @502;
error_page 504 = @504;
}
...
}
I analized network dump and found out that response from proxy was without "Connection" header always. So.. proxy prepares response without Connection header. As a result - we get response from Nginx with header "Connection: close" always.
I tried to add more_set_headers 'connection: keep-alive' :
location /our-portal/ {
proxy_pass http://127.0.0.1:8080;
more_set_headers 'connection: keep-alive';
break;
error_page 404 = @404;
error_page 502 = @502;
error_page 504 = @504;
}
but in this case Nginx returns header "Connection : close, keep-alive" and I don't now how this will be recognized by various types of brousers.
What I need to do for result header "Connection : keep-alive" ? Is it possible in this case ?
Thank you!