410 worker doesnt work on http

Hi

i need to set nonexistent page (hacked leftover page) as 410 status, and I found pages where members gave suggestions to use worker

tbh im not sure if my setting is correct or not …but I did get 410 status on HTTPS, but on HTTP it get 301 redirect to 410

how do I set status header for both version (HTTP and https)

Well http:// will be getting a 301 to go to https:// - that’s separate from the Worker and likely a setting on your custom domain.

If you’re testing with the workers.dev domain then that’s HSTS preloaded.

i didn’t use any redirect except the one from Cloudflare setting…and thank you if I turn it off both https and HTTP now return the correct HTTP status…one more time , is there any sample if let say I have 2 or 3 URL match that I need to 410? i don’t understand javascript

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.