mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-21 22:11:26 +00:00
Update NodeinfoService, disable redirects
This commit is contained in:
parent
80e0ada946
commit
240e6bbe4f
1 changed files with 8 additions and 2 deletions
|
@ -22,7 +22,10 @@ class NodeinfoService
|
|||
$wk = $url . '/.well-known/nodeinfo';
|
||||
|
||||
try {
|
||||
$res = Http::withHeaders($headers)
|
||||
$res = Http::withOptions([
|
||||
'allow_redirects' => false,
|
||||
])
|
||||
->withHeaders($headers)
|
||||
->timeout(5)
|
||||
->get($wk);
|
||||
} catch (RequestException $e) {
|
||||
|
@ -61,7 +64,10 @@ class NodeinfoService
|
|||
}
|
||||
|
||||
try {
|
||||
$res = Http::withHeaders($headers)
|
||||
$res = Http::withOptions([
|
||||
'allow_redirects' => false,
|
||||
])
|
||||
->withHeaders($headers)
|
||||
->timeout(5)
|
||||
->get($href);
|
||||
} catch (RequestException $e) {
|
||||
|
|
Loading…
Reference in a new issue