Skip to content

Commit

Permalink
redo update middleware.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
DarianM authored Nov 1, 2024
1 parent c242202 commit 97afcdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/open_payments/auth/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function createTokenIntrospectionMiddleware({
return
}

const authSplit = ctx.request.headers.authorization.split(' ')
const authSplit = ctx.request.headers.authorization?.split(' ')
if (authSplit?.length !== 2 || authSplit[0] !== 'GNAP') {
throw new OpenPaymentsServerRouteError(
401,
Expand Down

0 comments on commit 97afcdf

Please sign in to comment.