Setting security headers using workers no longer works

I noticed that my existing security headers worker (based on this) The brand new Security Headers Cloudflare Worker stopped working some time ago.

I’ve tested this The brand new Security Headers Cloudflare Worker and How to Implement Secure Headers using Cloudflare Workers? on 3 separate domains and none seem to work.

Has something changed on the Cloudflare platform? TIA.

It should work, I have a worker doing exactly the same thing.

Are you sure the workers route you set is correct?

Yes - it’s not changed on the primary site and we can’t see any added security headers on the 3 sites we used to test.

Did you check using https://securityheaders.com ?

Someone posted something similar, but didn’t post back:

They weren’t very specific either, also saying “not working.”

I just tested mine and it’s still working. Go into Workers “Quick Edit” and run it through Preview, then check Network at the bottom of the page for the headers.

Yes, that is how we became aware of the issue. * Strict-Transport-Security is a tick (presumably since this is set elsewhere on the Cloudflare dashboard, but all the others are a cross.

The only reason they wouldn’t show up is if the worker isn’t set to use the correct route.

Cloudflare won’t have changed the route on their own so I can’t see the issue.

If you check your Workers list, does it show that it’s being requested in the past 24 hours?

Yes - we can see the workers requests come up almost immediately.