Skip to content

Commit f662d98

Browse files
committed
[server] Tone down unnecessary logging around websocket verifyClient
1 parent d319d8c commit f662d98

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

components/server/src/express-util.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ export const query = (...tuples: [string, string][]) => {
2323
// Non-Strict: "rely" on subdomain parsing (do we still need this?)
2424
export const isAllowedWebsocketDomain = (originHeader: string, gitpodHostName: string, strict: boolean): boolean => {
2525
if (!originHeader) {
26-
// TODO(gpl) Can we get rid of this dependency alltogether?
27-
log.debug("Origin header check not applied because of empty Origin header!");
26+
// Origin header check not applied because of empty Origin header
2827
return true;
2928
}
3029

components/server/src/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export class Server<C extends GitpodClient, S extends GitpodServer> {
175175
if (info.req.url === "/v1") {
176176
// Connection attempt with Bearer-Token: be less strict for now
177177
if (!verifyOrigin(info.origin, false)) {
178-
log.warn("Websocket connection attempt with non-matching Origin header.", {
178+
log.debug("Websocket connection attempt with non-matching Origin header.", {
179179
origin: info.origin,
180180
});
181181
return callback(false, 403);
@@ -197,7 +197,7 @@ export class Server<C extends GitpodClient, S extends GitpodServer> {
197197
if (!authenticatedUsingBearerToken) {
198198
// Connection attempt with cookie/session based authentication: be strict about where we accept connections from!
199199
if (!verifyOrigin(info.origin, true)) {
200-
log.warn("Websocket connection attempt with non-matching Origin header: " + info.origin);
200+
log.debug("Websocket connection attempt with non-matching Origin header: " + info.origin);
201201
return callback(false, 403);
202202
}
203203
}

0 commit comments

Comments
 (0)