Skip to content

Commit 28217d4

Browse files
authoredFeb 21, 2025
fix: don't cache POST when serving embedded static html (#2766)
1 parent 5bd68dd commit 28217d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎src/run/headers.ts

+1
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ export const setCacheControlHeaders = (
279279

280280
if (
281281
cacheControl === null &&
282+
['GET', 'HEAD'].includes(request.method) &&
282283
!headers.has('cdn-cache-control') &&
283284
!headers.has('netlify-cdn-cache-control') &&
284285
requestContext.usedFsReadForNonFallback

0 commit comments

Comments
 (0)
Please sign in to comment.