[GH-ISSUE #353] Bearer token doesn’t work with CORS when only authorization header is allowed #130

Closed
opened 2026-03-16 13:37:04 +03:00 by kerem · 1 comment
Owner

Originally created by @mhusar on GitHub (Nov 27, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/353

Version: commit 37c41086d2

When I use the "Authentication" tab and choose "Bearer Token" as authentication type and define a token, the "Access-Control-Request-Headers" header is faulty.

current:
Access-Control-Request-Headers: authorization,undefined
should be:
Access-Control-Request-Headers: authorization

But on the server-side I defined, that only the authorization header is allowed:
Access-Control-Allow-Headers: authorization

When I define the "Authorization" header directly in the "Headers" tab, there is no problem. Reproducable with Firefox (Nightly) and Chrome (76).

Originally created by @mhusar on GitHub (Nov 27, 2019). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/353 Version: commit 37c41086d20ef89a009e58cca9235360161a731b When I use the "Authentication" tab and choose "Bearer Token" as authentication type and define a token, the "Access-Control-Request-Headers" header is faulty. current: Access-Control-Request-Headers: authorization,undefined should be: Access-Control-Request-Headers: authorization But on the server-side I defined, that only the authorization header is allowed: Access-Control-Allow-Headers: authorization When I define the "Authorization" header directly in the "Headers" tab, there is no problem. Reproducable with Firefox (Nightly) and Chrome (76).
kerem 2026-03-16 13:37:04 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@liyasthomas commented on GitHub (Nov 27, 2019):

Issue has been identified. Let us investigate what went wrong and get back to you in a jiffy.

<!-- gh-comment-id:559060601 --> @liyasthomas commented on GitHub (Nov 27, 2019): Issue has been identified. Let us investigate what went wrong and get back to you in a jiffy.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#130
No description provided.