I have two different Vue.JS apps deployed to AWS S3 + Cloudfront. The first has the domain set up in Route53, while the second has the domain set up in Google's domain service.
Both of the apps works completely fine. Recently I tried using the cloudfront predefined security headers under the "behavior" settings:
The header policy has all of the following:
The first app (with the domain configured in Route53) continues to work perfectly fine, but for the second app I started getting CORS issues.
This boggles the mind a little bit, because I'm getting CORS errors from within the same domain.
application/javascript
). Does this help? stackoverflow.com/a/67928269index.html
file and a bunch of js and css files when it's built, all handled by the vue CLI. Inspecting theindex.html
file shows that the generated script files are added with:<script src="/js/app.ecba88eb.js"></script>
. Just to be sure, I manually addedtype="application/javascript"
and updated S3 and invalidated the cloudfront cache, but I'm still getting the same result.