getlift / lift

Expanding Serverless Framework beyond functions using the AWS CDK
MIT License
912 stars 111 forks source link

Add webp and avif exceptions to CF request function #313

Closed MarcEspiard closed 1 year ago

MarcEspiard commented 1 year ago

Hi,

AWS has updated their list of extensions excluded from redirections in SPA, this PR updates the list to match AWS' (adding the webp extension) and also adds the avif extension.

This allows developers using lift's SPA construct to use .webp and .avif images. Currently it will redirect to /index.html and not display the image.

See: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html#redirects-for-single-page-web-apps-spa