New issue
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
Server adds CSP header when serving custom 404 page #55
Comments
|
@rothsandro I am also facing this issue in 11ty v2.0 |
|
There's a Discord thread on this too. Seems that it only happens when developing locally. Deployed sites run js on 404 pages. Here's a link to the thread: https://discord.com/channels/741017160297611315/1068561825391714344 |
|
I am having this problem too! in my 404 page: |
|
Looking at this one today 🙌🏻 |
|
This will roll up with dev server v1.0.4! |
|
Hi @zachleat, even after manually installing version 1.0.4 (since the one bundled into eleventy is not up to date), I still get these errors… do you have any idea why? |
it should work now, the |
|
@murtuzaalisurti Can you use the |
|
@zachleat yep, it's running |
|
@murtuzaalisurti can you test the repo above? it’s what I worked from to fix iirc https://github.com/rothsandro/repro.eleventy-404-csp Maybe I missed something! |
@zachleat yeah, I was able to reproduce the error. It is evident in 11ty |
|
great! can you upgrade to 2.0.1 and help report if the issue persists locally? |
no issues! works perfect. |
|
ah, hmm—I think we may need a new issue for yours then @murtuzaalisurti (sorry!) |
|
@zachleat so, the expected behavior should be that 11ty |
|
For 2.0.0 from a fresh install, yes. There are additional complexities around pre-installed dependencies or npm cache using an already available version that meets the package.json requirements for 2.0.0. But installing 2.0.1 should guarantee https://github.com/11ty/eleventy/blob/v2.0.1/package.json#L99 |
|
@zachleat yep, you are right, I tried running 11ty on stackblitz with |





When serving the custom 404 page by calling a non-existing url, the Dev Server responds with a Content Security Policy header. This blocks some content like JS files.
This only happens on the 404 page. On all other pages there are no CSP headers.
Repro: https://github.com/rothsandro/repro.eleventy-404-csp
The text was updated successfully, but these errors were encountered: