Request headers are not getting sent

I set a custom header, but it is not getting sent. This has worked in the past, but I cannot recall exactly when.

The CURL code snippet shows it, but the console log does not, and the server does not receive it.

CURL:

curl --location --request GET 'http://localhost:8083/ift/api/visibility/v3/products' \
--header 'ift-temp-limit: 2' \
--header 'Authorization: Bearer XXX'

Console log message:

GET /ift/api/visibility/v3/products HTTP/1.1
Authorization: Bearer XXX
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Cache-Control: no-cache
Postman-Token: f9be2868-bafc-4454-b13b-1e526ee53adf
Host: localhost:8083
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

Hey @jmacnaught,
Welcome to the community :wave:
This is an interesting situation. Could you share information about how you’re setting the headers, screenshots maybe?
I could try reproducing it at my end, if that helps.

Thanks,
Meena

Thanks, Meena

Here is a screen shot of the UI. I have checked the header to enable it. I usually have a variable name there, but I’m using a directly entered value in this test.

All seems fine I guess.
Could you try importing this template by selecting the Run in Postman option on top. There’s a request that sends Headers in there. If that works then maybe we can compare why this isn’t working.
https://docs.postman-echo.com/#da16c006-6293-c1fe-ea42-e9ba8a5e68b1

The Echo request worked correctly:

So there’s probably something we might be missing in the other request. :face_with_monocle:

All my collections have been imported from OpenAPI 3.0 spec. I created a new collection and added a single request, and that request sends the header correctly. So, at this point, I can only guess that the import sets or fails to set something.

So I generated a collection from an OpenAPI spec and modified a request to include some headers. I was able to see those headers in the request under Console.

Having the same issue. I tried adding some new headers today, and the old headers are still being sent but the new headers aren’t. I’ve check the server to see what’s it’ getting and it’s basically not sending the newly added headers

I found out it was my server eating the headers (Authorization header in my case). This code helped me, just place in your .htaccess file

Allow Authorization header to be passed to PHP

CGIPassAuth on

1 Like

This fixed it for me, thank you!