Skip to content

Commit

Permalink
Fix: look for x-amzn-remapped-authorization header in addition to s…
Browse files Browse the repository at this point in the history
  • Loading branch information
agurtovoy committed Jan 31, 2018
1 parent a5339d8 commit 5271ac4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export function setToken( headers: Headers, token: ?string ) {
}


export function extractToken( headers: ?Headers ): ?string {
const header = ( headers || {} )[ "authorization" ];
export function extractToken( headers: Headers = {} ): ?string {
const header = headers[ "authorization" ] || headers[ "x-amzn-remapped-authorization" ];
if ( !header )
return null;
const match = header.match( /^Bearer (.+)$/ );
Expand Down

0 comments on commit 5271ac4

Please sign in to comment.