Responses for both HTTP GET and POST requests contain “keep-alive” and
“server nginx” headers.
However, when I try to set proxy_http_version and connection header
within
server or http context instead of location, nginx will only proxy GET
requests. Responses for any POST requests seem to be coming directly
from
my application server (no keep-alive headers and server name contains
application server instead of nginx). What am I missing here?
I figured that the location settings have not been used at all.
So now I can see that even for location settings the same error occurs.
If I
use keepalive and proxy_set_header Connection “” it works. As soon as I
add
“proxy_http_version 1.1” to any context, the POST responses still get
returned directly by the application server…
I figured that the location settings have not been used at all.
So now I can see that even for location settings the same error occurs. If I
use keepalive and proxy_set_header Connection “” it works. As soon as I add
“proxy_http_version 1.1” to any context, the POST responses still get
returned directly by the application server…
The http headers returned to the client are incorrect. It should be
“Connection ‘keep-alive’” instead of “Conncetion “close””. Somehow all
the
nginx settings for response headers seem to be ignored. The fact that
the
application server’s name is returned in the response http header
instead of
“Server nginx” made me think that the response is “directly” returned
without taking nginx configuration into account.
The requests get logged to access.log. I enabled further log statements
using “$sent_http_header” variables. Still I can’t figure out why the
GET
requests are treated differently.
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.