Skip to content

Commit 92e7435

Browse files
committed
main.ts: Fix incorrect Cookie header delimiter
This resolves another login bug with a similar symptom that struck when users had multiple cookies associated with the server.
1 parent 34a27ed commit 92e7435

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type Editor = {
5151
async function handler(request: Request): Promise<Response> {
5252
const url = new URL(request.url);
5353

54-
let token = request.headers.get("Cookie")?.split(", ").find(function(each) {
54+
let token = request.headers.get("Cookie")?.split("; ").find(function(each) {
5555
return each.startsWith("vscode-tkn=");
5656
})?.split("=")[1] ?? null;
5757
if(token && Object.hasOwn(tokenToEditor, token)) {

0 commit comments

Comments
 (0)