Skip to content

Commit 315e28f

Browse files
[server] Allow ws connections without an Origin
448ab8c
1 parent 5efe589 commit 315e28f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: components/server/src/express-util.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ export const query = (...tuples: [string, string][]) => {
2222
// Only (current) exception: If no Origin header is set, skip the check!
2323
// Non-Strict: "rely" on subdomain parsing (do we still need this?)
2424
export const isAllowedWebsocketDomain = (originHeader: string, gitpodHostName: string, strict: boolean): boolean => {
25-
if (!originHeader || typeof originHeader !== "string") {
26-
// TODO(gpl) Can we get rid of this dependency alltogether?
25+
if (!originHeader) {
2726
log.warn("Origin header check not applied because of empty Origin header!");
28-
return false;
27+
return true;
2928
}
3029

3130
try {

0 commit comments

Comments
 (0)