Skip to content

Commit

Permalink
Update NodeinfoService, disable redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Feb 7, 2024
1 parent 80e0ada commit 240e6bb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/Services/NodeinfoService.php
Expand Up @@ -22,7 +22,10 @@ public static function get($domain)
$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) {
Expand Down Expand Up @@ -61,7 +64,10 @@ public static function get($domain)
}

try {
$res = Http::withHeaders($headers)
$res = Http::withOptions([
'allow_redirects' => false,
])
->withHeaders($headers)
->timeout(5)
->get($href);
} catch (RequestException $e) {
Expand Down

0 comments on commit 240e6bb

Please sign in to comment.