Jelly V
CDCloudflare Developers
•Created by Jelly V on 9/9/2024 in #workers-help
Headers with dots in the key are removed when I make a fetch request from a worker
I'm trying to call an API that requires me to put 4 specific headers in the request with a dot in in the name
I correctly add the headers
When I run it locally everything works. Then I deploy and it gives an error.
I tried sending the requests to requestbin and I notice some of my headers are gone
Request from worker running locally:
Request from worker running in prod:
Only the
I tested this with all kinds of variations, and only the headers with a "." in the name get removed. Dashes, underscores, all work. I tried creating my headers like an object. I tried making a
Accept
and the X-Source
headers which I set manually are present. All my WM_ prefixed headers are gone.I tested this with all kinds of variations, and only the headers with a "." in the name get removed. Dashes, underscores, all work. I tried creating my headers like an object. I tried making a
new Header()
and appending them 1 by one and it doesn't change anything.
Any fix around this?2 replies