Skip to content

Commit

Permalink
fix: added numbers into check extension
Browse files Browse the repository at this point in the history
  • Loading branch information
mamu0 committed Jan 13, 2025
1 parent c4326ee commit 03a6d75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/cloudfront-functions/src/viewer-request-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const handler = (
request.uri = request.uri.replace(/\/$/, '');
}
// Always add .html if there's no file extension, including special cases
if (!/\.[a-zA-Z]+$/.test(request.uri)) {
if (!/\.[0-9a-zA-Z]+$/.test(request.uri)) {
request.uri += '.html';
}
}
Expand Down

0 comments on commit 03a6d75

Please sign in to comment.