-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Remove CloudFront functions #406
base: master
Are you sure you want to change the base?
Conversation
Not sure how tests are run, I keep getting this error:
|
a5e241c
to
39fa506
Compare
Thanks for the PR! Yeah unfortunately tests are broken on master because of changes in serverless framework, haven't found time (or even have an idea) to fix it :/
Could you explain this? I'm not sure what the impact is? Will the application behave any differently?
Are the same exact security headers added? I.e. are there any practical changes for applications already deployed with Lift? |
@mnapoli No worries.
SPAs need their origin paths rewritten to While this works, the function is not necessary - by setting the custom error responses for 404 (not found) and 403 (unauthorized, S3 returns one if the file doesn't exist and
Here are the new headers (also linked in docs):
And here are the old headers:
So it is slightly different: mainly adding the I didn't retain the option to remove FYI - this build was tested with a SPA and Serverless deployment. |
Fixes #129
With these changes, the legacy CloudFront functions used to accomplish SPA redirects and injecting security headers to responses are no longer needed. This also fixes an issue when CloudFront functions limits are reached (mentioned in #350).