Commit 9f766c8
committed
fix: add Next.js RSC headers to CloudFront CachePolicy to prevent cache poisoning
Add RSC, Next-Router-Prefetch, Next-Router-State-Tree, and Next-URL
headers to CacheHeaderBehavior.allowList so that CloudFront
distinguishes RSC flight responses from HTML responses in the cache key.
Without these headers, static/ISR pages can serve text/x-component
data for normal HTML requests (or vice versa) when CloudFront caching
is active.
Closes #1001 parent 764a4fa commit 9f766c8
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| |||
0 commit comments