Add header to request to origin

I would like to add some specific header with a static value in all request CloudFlare sends to my origin.
It does not seem there is a straightforward way to do it.

I would have expected to find such a feature at least in page rules, like asked in Add HTTP header via page rules.

But furthermore this other post ask for adding response headers, while I wish to add a request header.

It seems adding response and request header can be done with workers, which is a bit cumbersome and costly.
(At least for someone used to CloudFront, where this feature is available as a simple unpaid option, “Origin Custom Headers” in Origin settings, where you simply list your custom headers to be added to requests.)

Isn’t there an easier way to do this?

(I was also fearing CloudFlare may strip custom request header added through a worker, but according to https://support.cloudflare.com/hc/en-us/articles/200170986-How-does-Cloudflare-handle-HTTP-Request-headers-, its seems it has not the same policy as CloudFront on this, which strip most request headers except those configured for being kept/added.)

This topic was automatically closed after 31 days. New replies are no longer allowed.