Open Kolobok12309 opened 9 months ago
Do you have a separate upstream block that proxy_pass
refers to?
Do you have a separate upstream block that
proxy_pass
refers to?
Yea, nchan placed after another nginx proxy
Or, mb i'm wrong understand you, ${WS_AUTH_URL}
is env with url(not upstream). Example http://tests-auth:4000/ws
I suspect if you change the var to refer to an upstream block by name, this will work.
Upstreams routed by URL alone don't travel the same code path as ones that go though an upstream block. This has always been a pain in the ass, even without Nchan.
I try it yesterday, same error
upstream auth {
server tests-auth:4000; # Docker instance
}
server {
...
location = /auth {
proxy_pass http://auth/ws;
...
}
...
}
Mb maybe I'm using upstream wrong?
But all worked if i move set_real_ip_from 0.0.0.0/0;
to location block (use it for allow/deny access to publication, pub and sub separated location).
Huh, that's wild. I'll see if I can fix this.
Huh, that's wild. I'll see if I can fix this.
I can create minimal repro in docker containers if you need
Nah I got it. This is one of those bugs that's about struggling with Nginx guts.
Nginx crashed if i use
set_real_ip_from
(and pass header X-Real-Ip) and usenchan_authorize_request
If i comment
nchan_authorize_request
orset_real_ip_from
or not pass header, all be fineNginx 1.25.2-alpine Nchan 1.3.6
Core dump