You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been using the module for almost one week and it works quite well. Thanks for the good job!
But there's one use case that I'm concerned: the request to the other http servers that hosted by the same nginx cannot be proxied. So I'm here to seek help for any workaround.
Repro steps:
Run nginx (built with this module) with nginx.conf that has multiple http servers (distinguished by the host field):
Use curl to send request app.example.com via proxy.example.com: curl -v -L -x https://proxy.example.com https://app.example.com.
* Trying <redacted-ip>:443...
* Connected to (nil) (<redacted-ip>) port 443 (#0)
* <redacted-ssl-handshake>
* allocate connect buffer!
* Establish HTTP proxy tunnel to app.example.com:443
* <redacted-ssl-handshake>
> CONNECT app.example.com:443 HTTP/1.1
> Host: app.example.com:443 <-- Host is `app.example.com`!
> User-Agent: curl/7.81.0
> Proxy-Connection: Keep-Alive
* <redacted-ssl-handshake>
< HTTP/1.1 405 Not Allowed
< Server: nginx/1.24.0
< Date: <redacted>
< Content-Type: text/html
< Content-Length: 157
< Connection: keep-alive
<
* Received HTTP code 405 from proxy after CONNECT
* CONNECT phase completed!
* Closing connection 0
* <redacted-ssl-handshake>
curl: (56) Received HTTP code 405 from proxy after CONNECT
I guess nginx dispatches the subsequent request CONNECT app.example.com:443 HTTP/1.1 to server app.example.com, according to the Host field. The other server doesn't have the proxy_connect directive hence raise a 405 for the connection.
Is there any workaround to overcome this?
The text was updated successfully, but these errors were encountered:
I guess nginx dispatches the subsequent request CONNECT app.example.com:443 HTTP/1.1 to server app.example.com, according to the Host field. The other server doesn't have the proxy_connect directive hence raise a 405 for the connection.
It seems as what you guessed here, but I'm not sure. I need some time to figure it out. Or you can enable and check the nginx debug log with your configuration.
Hi, I've been using the module for almost one week and it works quite well. Thanks for the good job!
But there's one use case that I'm concerned: the request to the other http servers that hosted by the same nginx cannot be proxied. So I'm here to seek help for any workaround.
Repro steps:
nginx.conf
that has multiple http servers (distinguished by the host field):curl
to send requestapp.example.com
viaproxy.example.com
:curl -v -L -x https://proxy.example.com https://app.example.com
.I guess nginx dispatches the subsequent request
CONNECT app.example.com:443 HTTP/1.1
to server app.example.com, according to theHost
field. The other server doesn't have theproxy_connect
directive hence raise a 405 for the connection.Is there any workaround to overcome this?
The text was updated successfully, but these errors were encountered: