Skip to content

Commit eb33d1a

Browse files
authored
feat(cubejs-api-gateway): alternative auth headers (#8987)
1 parent a421405 commit eb33d1a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/cubejs-api-gateway/src/gateway.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,8 +2310,10 @@ class ApiGateway {
23102310
}
23112311

23122312
protected extractAuthorizationHeaderWithSchema(req: Request) {
2313-
if (typeof req.headers.authorization === 'string') {
2314-
const parts = req.headers.authorization.split(' ', 2);
2313+
const authHeader = req.headers?.['x-cube-authorization'] || req.headers?.authorization;
2314+
2315+
if (typeof authHeader === 'string') {
2316+
const parts = authHeader.split(' ', 2);
23152317
if (parts.length === 1) {
23162318
return parts[0];
23172319
}

0 commit comments

Comments
 (0)