Skip to content

Commit 694ee81

Browse files
committed
feat(cubejs-api-gateway): alternative auth headers
1 parent 331d3a7 commit 694ee81

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)