Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorization header not being sent #5872

Closed
dakujem opened this issue Jan 31, 2019 · 3 comments
Closed

Authorization header not being sent #5872

dakujem opened this issue Jan 31, 2019 · 3 comments

Comments

@dakujem
Copy link

dakujem commented Jan 31, 2019

Describe the bug
Authorization header is not being sent to the server.

To Reproduce

  1. either set the authorization to bearer token and add a token
  2. or use the headers section and fill in anything and set the authentication to none

Neither works, no matter how i try to set the header.

Expected behavior
I would expect the Authorization header to be sent.

Screenshots
If I try x-authorization, this header gets to the server.
image

App information:

  • App Type Native App
  • Postman Version [e.g. 6.7.2]
  • OS: Windows 10 x64
  • PHP , Apache 2, mod_fcgid
// dump(getallheaders());
array(7) {
   "Connection" => string(5) "close"
   "Accept-Encoding" => string(13) "gzip, deflate"
   "Host" => string(11) "crm.qlis.lo"
   "Accept" => string(3) "*/*"
   "User-Agent" => string(20) "PostmanRuntime/7.6.0"
   "Cache-Control" => string(8) "no-cache"
   "X-Authorization" => string(158) "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg5Nzg5MDEsImlhdCI6MTU0ODk3NzEwMSwiYXVkIjoidmlhYXVyZWEifQ.5FRmodEoDuFsDq_DL0lr68QRFQL9-9m6t4H ... "
}
@dakujem
Copy link
Author

dakujem commented Feb 1, 2019

BTW: is there any way to analyze network traffic inside Postman (except for network sniffers like wireshark)? The network tab in the devtools shows nothing.

I have to appologize for this report.

I tried manually sending the request using cURL and found out that it is actually Apache eating away the header!!

The solution was adding

# Allow Authorization header to be passed to PHP
CGIPassAuth on

to the .htaccess file.

Sorry, it did not occur to me that the server might be eating the header.

@dakujem dakujem closed this as completed Feb 1, 2019
@boctulus
Copy link

I've tried dakujem solution but not working for Windows 11 (my case)

@Danroyal001
Copy link

@dakujem your solution worked for me too, thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants