mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 02:54:45 +02:00
Simplify this
This commit is contained in:
parent
4969aed383
commit
9b2dfb4212
@ -52,12 +52,12 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
Http::macro(
|
||||
'daemon',
|
||||
fn (Node $node, array $headers = []) => Http::acceptJson()->withHeaders([
|
||||
'Authorization' => 'Bearer ' . $node->getDecryptedKey(),
|
||||
] + $headers)
|
||||
fn (Node $node, array $headers = []) => Http::acceptJson()
|
||||
->withToken($node->getDecryptedKey())
|
||||
->withHeaders($headers)
|
||||
->withOptions(['verify' => (bool) app()->environment('production')])
|
||||
->timeout(config('pterodactyl.guzzle.timeout'))
|
||||
->connectTimeout(config('pterodactyl.guzzle.connect_timeout'))
|
||||
->timeout(config('panel.guzzle.timeout'))
|
||||
->connectTimeout(config('panel.guzzle.connect_timeout'))
|
||||
->baseUrl($node->getConnectionAddress())
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user