File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
packages/open-next/src/core/routing Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @opennextjs/aws " : patch
3
+ ---
4
+
5
+ fix cache control headers for fully static page with base path
Original file line number Diff line number Diff line change @@ -245,7 +245,9 @@ export function fixCacheHeaderForHtmlPages(
245
245
// https://opennext.js.org/aws/v2/advanced/workaround#workaround-nextserver-does-not-set-cache-headers-for-html-pages
246
246
// Requests containing an `x-middleware-prefetch` header must not be cached
247
247
if (
248
- HtmlPages . includes ( localizedPath ) &&
248
+ HtmlPages . find (
249
+ ( path ) => `${ NextConfig . basePath ?? "" } ${ path } ` === localizedPath ,
250
+ ) &&
249
251
! internalEvent . headers [ "x-middleware-prefetch" ]
250
252
) {
251
253
headers [ CommonHeaders . CACHE_CONTROL ] =
You can’t perform that action at this time.
0 commit comments