mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
Handle errors sent back over the sockt
This commit is contained in:
@@ -63,7 +63,11 @@ class WebsocketController extends ClientApiController
|
||||
->expiresAt($now->addMinutes(15)->getTimestamp())
|
||||
->withClaim('user_id', $request->user()->id)
|
||||
->withClaim('server_uuid', $server->uuid)
|
||||
->withClaim('permissions', ['connect', 'send-command', 'send-power'])
|
||||
->withClaim('permissions', array_merge([
|
||||
'connect',
|
||||
'send-command',
|
||||
'send-power',
|
||||
], $request->user()->root_admin ? ['receive-errors'] : []))
|
||||
->getToken($signer, new Key($server->node->daemonSecret));
|
||||
|
||||
$socket = str_replace(['https://', 'http://'], ['wss://', 'ws://'], $server->node->getConnectionAddress());
|
||||
|
||||
Reference in New Issue
Block a user