We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently using dynamic substitutions with the inline style tag:
style
<script> globalThis.import_meta_env = JSON.parse('"import_meta_env_placeholder"'); </script>
Unfortunately, this requires adding unsafe-inline as an option to the script-src value when using the Content-Security-Policy header.
unsafe-inline
script-src
Content-Security-Policy
Is there an alternative mechanism available, which would allow this code to reside in a "real" script?
The text was updated successfully, but these errors were encountered:
Hi, @jacquesg
Please try the other solution we made: https://github.com/runtime-env/runtime-env
Since the runtime-env's approach is to load a external script (same origin from your app) generated at runtime, it should works with script-src: self.
script-src: self
Thank you. 😃
Sorry, something went wrong.
No branches or pull requests
Currently using dynamic substitutions with the inline
style
tag:Unfortunately, this requires adding
unsafe-inline
as an option to thescript-src
value when using theContent-Security-Policy
header.Is there an alternative mechanism available, which would allow this code to reside in a "real" script?
The text was updated successfully, but these errors were encountered: