Skip to content

Commit df50737

Browse files
authored
feat: add .lottie to the redirect rgx for single-page-app construct
Lottie files are a growing option for online animations. https://en.wikipedia.org/wiki/Lottie_(file_format)#The_dotLottie_file_format
1 parent 893940b commit df50737

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/constructs/aws/SinglePageApp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class SinglePageApp extends StaticWebsiteAbstract {
4545
* Files extensions list taken from: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html#redirects-for-single-page-web-apps-spa
4646
* Add pdf, xml, webmanifest, avif and wasm as well
4747
*/
48-
const code = `var REDIRECT_REGEX = /^[^.]+$|\\.(?!(css|gif|ico|jpg|jpeg|js|png|txt|svg|woff|woff2|ttf|map|json|webp|xml|pdf|webmanifest|avif|wasm)$)([^.]+$)/;
48+
const code = `var REDIRECT_REGEX = /^[^.]+$|\\.(?!(css|gif|ico|jpg|jpeg|js|png|txt|svg|woff|woff2|ttf|map|json|webp|xml|pdf|webmanifest|avif|wasm|lottie)$)([^.]+$)/;
4949
5050
function handler(event) {
5151
var uri = event.request.uri;

0 commit comments

Comments
 (0)