Skip to content

Commit

Permalink
Do not send response multiple times on error (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
nevalla authored Jan 22, 2024
1 parent 1eb028d commit 2f8b035
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/request-handlers/client-public-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ export function handleClientPublicKey(req: IncomingMessage, res: ServerResponse,

try {
const tokenData = verifyClientToken(authorization?.token, server);

clusterId = tokenData.clusterId;
} catch(error) {
res.writeHead(403);
res.end();

return;
}
}

Expand Down

0 comments on commit 2f8b035

Please sign in to comment.