Commit 09cb22e
committed
fix(webhooks): restrict health route to internal service-binding calls
The public webhook host (webhooks.trycheatcode.com) served /health
unauthenticated and unrate-limited, exposing releaseSha and versionId with no
public consumer: the only caller is the gateway's release aggregation, which
probes https://webhooks.internal/health over the WEBHOOKS service binding.
Gate the route on the internal hostname and answer c.notFound() on any other
host, indistinguishable from a nonexistent route. Same posture as the
preview-proxy public health removal (#103): every public route must have a
named external consumer. Gateway is unchanged and its binding fetch already
carries the internal hostname, so there is no deploy-order skew.1 parent 39d1a7c commit 09cb22e
2 files changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
174 | | - | |
175 | | - | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
0 commit comments