Commit 346b142
fix(middleware): Skip viewer context for static asset routes
Avoid accessing request.user for ANONYMOUS_STATIC_PREFIXES paths,
which would add Vary: Cookie and break HTTP caching for static assets.
This matches the pattern used by StaffMiddleware and SuperuserMiddleware.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 15cd6d8 commit 346b142
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
31 | 38 | | |
| |||
0 commit comments