CORS Issue for Javascript #1891
Unanswered
michaelaguiar
asked this question in
Support
Replies: 1 comment 2 replies
-
|
CORS issues happen when you load resources from a different domain. If you use serverless-lift that should not happen. Are you loading stuff from another domain? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I am deploying a Laravel app and am getting a CORS Issue for .js file, and they won't load. I followed the documentation and included
serverless-lift, per my example below, and css / images load fine. It's only the .js files that are running into the CORS Issue.I noticed that the Cloudfront behavior for the
/build/*route can have aCORS-S3OriginOrigin Request Policy that fixes the issue, but is there a way to do this automatically in the serverless.yml file, or is there a different solution for why .js files won't load?How to reproduce:
Beta Was this translation helpful? Give feedback.
All reactions