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