Fixes two nginx rule defects found by real nginx in CI
Plain map keys compare case-insensitively, so /Over-Mij was not redirected. A path starting with an encoded backslash could become an open redirect through the trailing-slash rule; it now gets the 404 page. Also makes the tests readable for nginx's workers and less sensitive to the slow CI runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ The final commands with full paths go into the draft in the `server-ops` reposit
|
||||
| gzip and headers from other vhosts | gzip is on nowhere, and `nginx.conf` has no http-level `add_header`. gzip in this server block changes no other site |
|
||||
| Default block | Since 2026-10-21, `/etc/nginx/conf.d/00-default.conf` answers an unknown host with 444. The current comment that nginx would fall back to WordPress is out of date; correct it in the generator |
|
||||
| nginx 1.30.6 | Every directive in the sketch is standard there. `if` with only `return` at server level is safe |
|
||||
| `map` matching | Exact strings win over regexes, so `/over-mij ""` beats the variant regex and no loop arises |
|
||||
| `map` matching | Plain string keys in `map` compare case-insensitively, so `/over-mij ""` also matched `/Over-Mij` and blocked its redirect (found by the real nginx in CI). Canonical forms are therefore case-sensitive regex keys placed before the variant regexes; the first regex that matches wins and no loop arises. The draft must use the regenerated config |
|
||||
| `error_page` | Its internal redirect runs server-level rewrite and `if` again with `$uri=/404.html`. That matches no map rule. **Keep it so: no map rule may match `/404` or `/404.html`** |
|
||||
| Directories | `try_files $uri` matches files only, so `/assets` gives 404 |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user