My problem, i dont get the security headers to work.
If I add them to my wordpress website, Cloudflare seems to filter them out.
Next i tried it via a Worker …nothing happened:
No i try it with page rules.
So the wildcards are probably the issue in your filter. if you change hostname to just be protect-piercing.de and the second one to contains removing the * then re-deploy.
Please remove this part, since it is unnecessary and will never be triggered. The rest seems to be correct. I anyway for some reasons would not recommend using Cloudflare for setting security headers.
it just applies when traffic is routed through Cloudflare, if unproxied or you once want to switch CDN you lose your security headers.
if someone calls your page and resolved your domain directly to your origin IP all the security features do not apply.
you are depending on Cloudflare
you don’t use any free Cloudflare rules for things that are solvable differently/better
I personally recommend always impelemting them natively in your server config (nginx.conf or .htaccess)
my security headers are implemented like this in my .htaccess: