in normal hosting i can add .htaccess fiel how can i add security headers in Cloudflare pages. i want to add these headers for static site hosted with Cloudflare pages.
Content-Security-Policy
X-Frame-Options
Permissions-Policy
thanks in advance and apologies as i am unable to understand where i need to add in Cloudflare pages
thanks @KianNH for sharing the url i have read this url before what i am unable to understand is if this is a simple _header file like .htaccess file i add in my site files or does this go somewhere speciall in Cloudflare pages as all the files in Cloudflare pages are auto pushed via GitHub. So i suppose the _header file will be part of the files coming from repo and not something i need to add in Cloudflare correct?
Something doesnt seems to be working, some hsts rules are already applied via Cloudflare dashboard do i have to select between auto rules and custom headers or i can use custom headers file to enhnace the policy header issues.
i have read that but i am unable to understand what secure page is? is it refering to Cloudflare pages? what i need to add there to apply to my custom domain example.com for example hosted on Cloudflare pages thanks
this really helped me understand and apply the needed headers. I believ the Cloudflare documents can be 1-2 lines longer as coming from apache nginx i cant wrap my head around how to make those things work in Cloudflare
for example : ErrorDocument 404 /404/ how to format in _headers when deploying to Cloudflare pages etc. (custom 404 is not working for me i know it needs different format but not sure which one)
ErrorDocument: 404 /404/
ErrorDocument 404: /404/
i will tet both but if there is an example it really help as i do not have to stupid repo commits to test which one works
thank you for all the great support have a good day