Daemon secret is not a thing anymore
This commit is contained in:
parent
1aacc48f0c
commit
2cabfeec15
2 changed files with 0 additions and 32 deletions
|
@ -32,36 +32,6 @@ trait JavascriptInjection
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Injects server javascript into the page to be used by other services.
|
||||
*
|
||||
* @param array $args
|
||||
* @param bool $overwrite
|
||||
* @return array
|
||||
*/
|
||||
public function injectJavascript($args = [], $overwrite = false)
|
||||
{
|
||||
$request = $this->request ?? app()->make(Request::class);
|
||||
$server = $request->attributes->get('server');
|
||||
$token = $request->attributes->get('server_token');
|
||||
|
||||
$response = array_merge_recursive([
|
||||
'server' => [
|
||||
'uuid' => $server->uuid,
|
||||
'uuidShort' => $server->uuidShort,
|
||||
'daemonSecret' => $token,
|
||||
],
|
||||
'server_token' => $token,
|
||||
'node' => [
|
||||
'fqdn' => $server->node->fqdn,
|
||||
'scheme' => $server->node->scheme,
|
||||
'daemonListen' => $server->node->daemonListen,
|
||||
],
|
||||
], $args);
|
||||
|
||||
return Javascript::put($overwrite ? $args : $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Injects the exact array passed in, nothing more.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue