Skip to content

Commit 5b48f04

Browse files
authored
fix: remove authorization header from frontend (#781)
1 parent cfdd523 commit 5b48f04

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/api/src/routers/api/clickhouseProxy.ts

+5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ const getConnection: RequestHandler =
6969
// prettier-ignore-next-line
7070
async (req, res, next) => {
7171
try {
72+
if (req.headers['authorization'] === 'Basic Og==') {
73+
// this means username & password === 0, which indicates we must be
74+
// doing some other authorization mechanism (probably connection_id)
75+
delete req.headers['authorization'];
76+
}
7277
const { teamId } = getNonNullUserWithTeam(req);
7378
const connection_id = req.headers['x-hyperdx-connection-id']!; // ! because zod already validated
7479
delete req.headers['x-hyperdx-connection-id'];

packages/common-utils/src/clickhouse.ts

+2
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,8 @@ export class ClickhouseClient {
455455
wait_end_of_query: 0,
456456
cancel_http_readonly_queries_on_client_close: 1,
457457
},
458+
username: '',
459+
password: '',
458460
compression: {
459461
response: true,
460462
},

0 commit comments

Comments
 (0)