-
I'm trying to get Vite and Rails working in a docker setup:
In the head of my
Now when I load the server, the JS console throws an error:
I had a look into the setup and came across this line
These lines were generated by the
Is this a bug? How is it supposed to work? When I set the CSP by hand to
The script is loaded... What am I getting wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Hubert! The strange part of the CSP configuration is that it doesn't include the original domain ( Try adding |
Beta Was this translation helpful? Give feedback.
Hi Hubert!
The strange part of the CSP configuration is that it doesn't include the original domain (
http://staff.lvh.me:4000
), which is usually allowed by usingscript_src :self
.Try adding
:self
to the allowed sources, instead of using:4000
explicitly.