Widen / cloudfront-auth

An AWS CloudFront Lambda@Edge function to authenticate requests using Google Apps, Microsoft, Auth0, OKTA, and GitHub login
ISC License
623 stars 148 forks source link

Rewrite default urls to ./index.html #61

Open jaredstehler opened 4 years ago

jaredstehler commented 4 years ago

Since we need to use a CloudFrontOriginAccessIdentity to not expose our S3 content publicly, we can't (I believe) use the S3 website endpoint as a CloudFront origin, meaning we can't use the S3 website feature which allows for default folder URLs to resolve to index.html under the hood. This PR rewrites all URI's which end in '/' to append 'index.html'.

It might be nice to make this configurable; I'm willing to go down the road of updating the build.js to add that as a parameter if folks think this is useful enough.

ashtonian commented 3 years ago

I think its worth making configurable :)

thatsjet commented 3 years ago

Original suggestion came from me and YES totally would love to have it configurable. Also I'd be totally happy to contribute the PR to modify build.js if you want.