HTTP Headers (e.g. Content-Security-Policy) on Pages #54257
Replies: 21 comments 18 replies
|
We don't support this feature today so a |
|
@yoannchaudet Are there any plans to support his in the future? I find it quite important to be able to change/add those headers. |
|
can I also please vote for this feature. I need to add security headers to my site. Any site created with Github pages gets a Grade F score on https://securityheaders.io/ which is abysmal. Is there any update on the timescale for having this available please? |
|
Need to add: These are new security requirements for using SharedArrayBuffer in javascript. |
|
This deserves much more attention. In the nowadays internet security headers are becoming more and more important. Currently GitHub Pages doesn't have the ability to add custom headers, making it impossible to adopt these security measures. |
|
+1 again on this. Maybe adding a lot of comments will cause enough traffic for the feature to get prioritized. |
|
+1 here! |
|
+100500 ✔️ |
|
I have been using cloudflare pages and netlify, both have free plans and support headers: cloudflare pages: netlify: would be great if github also supported them, would simplify things. |
|
This should be fixed by now. If it can't be custom headers, at least add the basic security headers! Please! |
|
@yoannchaudet can we get some updates on this? Can this be prioritized? |
GitHub don't take security seriously then? |
|
I'll add, I could even see a GH Pages CSP being a thing that you could enforce across all repositories in an organization as an admin. Regardless, I think it would be very fitting for GitHub to add customization for content security, feature, and other policy headers in the near future, as the meta tag equivalents do have some limitations. I'd welcome either full control of the headers or just a checkbox to add a predetermined whitelist for only local resources within a Pages site (which would probably be simpler to implement than full customization). I'd even be happy if there were some CSP rules you couldn't opt out of — if you want to host a fully-fledged website, you'll want to use services more powerful than GH Pages anyway. SourceHut sites have a default CSP. Only downside is this would be a breaking change. |
|
so the need is still there, but no official message from github on it? I build my device firmware here and want the device front end (built in quasar) to go out and fetch updates - since the device is the webserver serving the app, the request going out to the firmware needs to be cors-allowed. |
|
+1 this request! I would love to see something toggleable in the Settings -> Pages section of the repository. |
|
Why is it when we select "Enforce HTTPS" for a custom domain, it doesn't send the "Strict-Transport-Security" header at a minimum? I'm not asking whether it's some kind of customizable thing, it just seems like that should be default-required when enforcing HTTPS since that's what that response header does. Side note: it would also reduce some unnecessary (and insecure!) HTTP traffic to github, in that browsers (on repeat visits) would stop sending the HTTP version of that request that github has to 301 redirect to the HTTPS site. |
|
3 years and seemingly no answer as to what specific reason GitHub has no support for this feature which they would seemingly like to over complicate by forcing users to use their server's configurations instead of what the user wants. Even if the mass majority don't care, just give users the choice. Or at the very least, give reasoning as to why you won't do this. It's really not that hard to do, I would think. |



Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
Question
Body
Hi, I'm wondering if it's possible to set custom HTTP Headers on websites hosted on GitHub Pages? I know it's possible via the
<meta>tag, which I am willing to use if it's the only way, but I'd rather use an actual header if possible.Thanks!
All reactions