Workers fetch API adds unwanted headers

Dear Cloudflare,

Fetch api adds a TON of unwanted headers like:

X-Forwarded-For: xx.xx.xx.xx
CF-RAY: 4f6b336735exxxx-CDG
X-Forwarded-Proto: http
CF-Visitor: {“scheme”:“http”}
CF-EW-Via: 15
CDN-Loop: Cloudflare; subreqs=1
cf-worker: xxxx.workers.dev

Cloudflare should put a flag in CF object not to add these!

Fetch api adds a TON of unwanted headers like:

X-Forwarded-For: xx.xx.xx.xx
CF-RAY: 4f6b336735exxxx-CDG
X-Forwarded-Proto: http
CF-Visitor: {“scheme”:“http”}
CF-EW-Via: 15
CDN-Loop: Cloudflare; subreqs=1
cf-worker: xxxx.workers.dev

Cloudflare should put a flag in CF object not to add these!

Fetch api adds a TON of unwanted headers like:

X-Forwarded-For: xx.xx.xx.xx
CF-RAY: 4f6b336735exxxx-CDG
X-Forwarded-Proto: http
CF-Visitor: {“scheme”:“http”}
CF-EW-Via: 15
CDN-Loop: Cloudflare; subreqs=1
cf-worker: xxxx.workers.dev

Cloudflare should put a flag in CF object not to add these!

Is there a negative impact to these headers other than your not wanting them? What problem are they causing, if any?

2 Likes

Hiding the true cost of the “service”? ¯\(ツ)

Negative impact is loggability by third party services.
Sometimes that is wanted sometimes is not.
I would strongly suggest to put them as default headers when creating new Headers(),
but allowing to delete them before a fetch request.