HTTP Headers (e.g. Content-Security-Policy) on Pages #54257
-
Select Topic AreaQuestion BodyHi, 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 |
Beta Was this translation helpful? Give feedback.
Replies: 17 comments 16 replies
-
We don't support this feature today so a |
Beta Was this translation helpful? Give feedback.
-
@yoannchaudet Are there any plans to support his in the future? I find it quite important to be able to change/add those headers. |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
Need to add: These are new security requirements for using SharedArrayBuffer in javascript. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
+1 again on this. Maybe adding a lot of comments will cause enough traffic for the feature to get prioritized. |
Beta Was this translation helpful? Give feedback.
-
+1 here! |
Beta Was this translation helpful? Give feedback.
-
+100500 ✔️ |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
To integrate my page, I'm required to have all that are in red: STS, CSP, XFO, XCTO, RP. That feature would be great! |
Beta Was this translation helpful? Give feedback.
-
This should be fixed by now. If it can't be custom headers, at least add the basic security headers! Please! |
Beta Was this translation helpful? Give feedback.
-
@yoannchaudet can we get some updates on this? Can this be prioritized? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
GitHub don't take security seriously then? |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
+1 this request! I would love to see something toggleable in the Settings -> Pages section of the repository. |
Beta Was this translation helpful? Give feedback.
We don't support this feature today so a
meta
tag unfortunately is the only way.