Welcome! Log In Create A New Profile

Advanced

Replacing response header "Connection"

Posted by aler 
Replacing response header "Connection"
July 02, 2013 04:29AM
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!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 187
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready