Sec-Fetch-Mode:cors
added by the browser to the request headers when requesting a script creating CORS issue
#308
Unanswered
pranaybinju
asked this question in
Q&A
Replies: 1 comment
-
Running into this same issue. Is there a reason why we're adding the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently migrated React specific part of my project from Webpacker to Vite_rails. The build created is stored on Cloudfront. But while requesting this through
vite_javascript_tag
, the browser addsSec-Fetch-Mode:cors
to the request and Cloudfront blocks sending the script. This wasn't the case when build with Webpacker.Also, script tag has
type=module
inserted in it with Vite_rails. Is this prompting the browser to addSec-Fetch-Mode:cors
? What can be any other way to handle this issue possibly from the front-end, apart from making changes in the configuration at the Cloudfront ?Beta Was this translation helpful? Give feedback.
All reactions