Sandboxes not applying CSP!
I'm having lots of problems with applying my custom csp to my sandboxed page. I have in my manifest overrides
However my CSP is always:
When requested, am I doing something wrong or is this just glitching? I can't seem to find much documentation on this 😦
9 Replies
@acorn221 has reached level 5. GG!
@louisgv if you get a chance to look at this, it would be much appreciated ♥ (lmk if you want me to provide an example repo)
For the life of me, I can't get this to work for some reason
I'd also be more than happy to submit a pr to the example repo with the solution
@acorn221 yeah can you make it into a repo, also checkout the with-wasm-zig repo for the csp syntax
Cheers! I'll get on it when I get home
@louisgv I found the problem! it turns out, the CSP doesn't get set if the page requested has the wrong capitals (eg. I was requesting, and then loading the page sandboxes/gapiauth.html, but the CSP was only sent over when I requested sandboxes/GapiAuth.html, as the component is called called GapiAuth.tsx )
https://github.com/Acorn221/plasmo-csp-case-glitch here's a little demo repo
GitHub
GitHub - Acorn221/plasmo-csp-case-glitch
Contribute to Acorn221/plasmo-csp-case-glitch development by creating an account on GitHub.
cool beans!
Hmm..
casing for page is a bit of a headache lol... I'd suggest for entry file, just use lowercase and
-
It's just annoying as it loads the page when the casing is not identical, but it's just the CSP that breaks
Super User
Why are website URLs not case-sensitive?
What was the design choice here? Why are URLs designed to not be case-sensitive?
For example:
When I type "gaming.stackexchange.com", it will take me to Arqade.SE.
If I type "GaminG.StackExchang...
^ yeah there's a whole history there re:URL casing... but the end URI likely are case-insensitive