Commit be4ff12
committed
docs(deployment): drop
The nginx snippet in docs/deployment.md recommended
`Cache-Control: public, immutable` for `/uploads/`, which is wrong
for iManager's FileStorage layout.
FileStorage writes to `var/uploads/<itemId>/<fieldId>/<filename>`
keeping the user's original filename. Re-uploading a file under
the same name leaves the URL stable while the bytes change. With
`immutable` set, browsers serve the stale bytes for up to 30 days
(the `expires` window) and skip revalidation entirely.
Switch to `Cache-Control: public, must-revalidate` and add an
inline comment explaining the choice. The 30-day expires window
is kept; browsers now send `If-None-Match` on every hit and
nginx's built-in ETag answers 304 cheaply when the file is
unchanged, 200 with the new bytes when it changed.
The Caddy snippet in the same section was already correct (no
explicit Cache-Control, default revalidation), so it stays
untouched.
CHANGELOG entry under Unreleased / Documentation. No code or
behavior change.
This mirrors the same fix applied to Scriptor's docker/nginx.conf
in scriptor#fix/uploads-cache-immutable (the bug surfaced there
when re-uploading the same-named image kept showing the old one).immutable from nginx /uploads/ cache header1 parent 05b51a0 commit be4ff12
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
8 | 25 | | |
9 | 26 | | |
10 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
156 | 165 | | |
157 | 166 | | |
158 | 167 | | |
159 | 168 | | |
160 | | - | |
| 169 | + | |
161 | 170 | | |
162 | 171 | | |
163 | 172 | | |
| |||
0 commit comments