Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharthesavior committed Aug 25, 2023
1 parent 7149318 commit d3df599
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/Services/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,6 @@ public function handleWsHandshake(Request $request, Response $response): bool
return false;
}

// check for authorization
try {
$authToken = $request->header['authorization'] ?? null;
if ($authToken !== 'YOUR_SECRET_TOKEN') {
throw new Exception('Unauthorized');
}
} catch (Exception $e) {
$response->status(401);
$response->end($e->getMessage());
return false;
}

foreach($headers as $headerKey => $val) {
$response->header($headerKey, $val);
}
Expand Down

0 comments on commit d3df599

Please sign in to comment.