Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 5911d8f

Browse files
committed
Fix ISR issue with index.ts
For the root path `/` the `s3StorePage` was not correctly storing to the index.html file and instead was storing as `.html` Added an extra regex replace() to deal with the root path.
1 parent e63f99c commit 5911d8f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/libs/lambda-at-edge/src/s3/s3StorePage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const s3StorePage = async (
3030
? `${options.basePath.replace(/^\//, "")}/`
3131
: "";
3232
const baseKey = options.uri
33+
.replace(/^\/$/, "index")
3334
.replace(/^\//, "")
3435
.replace(/\.(json|html)$/, "")
3536
.replace(/^_next\/data\/[^\/]*\//, "");

0 commit comments

Comments
 (0)