Skip to content

Commit 620314b

Browse files
committed
Disable token cookie for now
1 parent 0fd8653 commit 620314b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/vs/server/webClientServer.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ export class WebClientServer {
143143
}
144144
}
145145

146-
private _hasCorrectTokenCookie(req: http.IncomingMessage): boolean {
147-
const cookies = cookie.parse(req.headers.cookie || '');
148-
return (cookies['vscode-tkn'] === this._connectionToken);
149-
}
146+
// private _hasCorrectTokenCookie(req: http.IncomingMessage): boolean {
147+
// const cookies = cookie.parse(req.headers.cookie || '');
148+
// return (cookies['vscode-tkn'] === this._connectionToken);
149+
// }
150150

151151
private async fetchClientTheme(): Promise<ClientTheme> {
152152
await this._themeService.readyPromise;
@@ -270,9 +270,11 @@ export class WebClientServer {
270270
return res.end();
271271
}
272272

273-
if (this._environmentService.isBuilt && !this._hasCorrectTokenCookie(req)) {
274-
return this.serveError(req, res, 403, `Forbidden.`, parsedUrl);
275-
}
273+
// NOTE@coder: Disable until supported (currently this results in 403 errors
274+
// in production builds and we already have authentication).
275+
// if (this._environmentService.isBuilt && !this._hasCorrectTokenCookie(req)) {
276+
// return this.serveError(req, res, 403, `Forbidden.`, parsedUrl);
277+
// }
276278

277279
const remoteAuthority = this.getRemoteAuthority(req);
278280

0 commit comments

Comments
 (0)