Commit 112435d
committed
nginx: align webrtc/signaling proxy with SUBFOLDERwebsocket, honour SUBFOLDER
Two issues raised in review (both server blocks, :3000 and :3001):
1. The signaling regex was anchored at root: `^/webrtc/signaling/?$`. With
a non-default SUBFOLDER deployment (e.g. SUBFOLDER=/foo/), the request
path `/foo/webrtc/signaling/` would not match and would fall through
to the static handler. Replace the leading `/` with the SUBFOLDER
placeholder so the same sed substitution that processes every other
location block also applies here. Default `SUBFOLDER=/` keeps the
regex equivalent to before.
2. The new WebSocket location was missing the long timeouts and
forwarded client headers that `SUBFOLDERwebsocket` already sets.
Without them, signaling sessions can be cut by nginx defaults and
selkies upstream sees only 127.0.0.1 as the client IP. Mirror the
full set: X-Real-IP, X-Forwarded-For, X-Forwarded-Proto, the three
3600s timeouts, and client_max_body_size 10M. /turn gains the same
forwarded headers (no timeouts — short HTTP request).1 parent c49d8ea commit 112435d
1 file changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
63 | | - | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
68 | 77 | | |
| 78 | + | |
69 | 79 | | |
70 | 80 | | |
71 | 81 | | |
| |||
134 | 144 | | |
135 | 145 | | |
136 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
140 | 153 | | |
141 | | - | |
| 154 | + | |
142 | 155 | | |
143 | 156 | | |
144 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
145 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
146 | 165 | | |
| 166 | + | |
147 | 167 | | |
148 | 168 | | |
149 | 169 | | |
| |||
0 commit comments