Custom Headers with Worker Fetch

I'm trying to interact with the Walmart API using fetch from a Queue consumer. The API requires I provide some custom headers which are not x-prefixed. It seems that Cloudflare's fetch strips these headers. Is there some way I can avoid this? Thanks!
5 Replies
SuperHelpflare
Feedback
Feedback has been submitted! Thank you :)
maxwellray
maxwellrayOP3w ago
to be specific, Walmart's API requires I provide a WM_SVC.NAME header
Chaika
Chaika3w ago
Cloudflare removes headers with dots in them https://developers.cloudflare.com/fundamentals/reference/http-headers/#request-headers
Note Cloudflare may remove HTTP request headers with names considered invalid according to NGINX ↗ — for example, header names containing a . (dot) character.
Cloudflare Docs
Cloudflare HTTP headers
Cloudflare passes all HTTP request headers to your origin web server and adds additional headers as specified below.
Chaika
Chaika3w ago
Other headers are fine. It's not about the x- prefix
maxwellray
maxwellrayOP3w ago
got it. and there's no way i can whitelist? there's no way for me to modify the headers walmart's API requires, so it sounds like there's no way to consume the walmart api via a cloudflare worker

Did you find this page helpful?