Skip to content

Commit 240e6bb

Browse files
committed
Update NodeinfoService, disable redirects
1 parent 80e0ada commit 240e6bb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/Services/NodeinfoService.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ public static function get($domain)
2222
$wk = $url . '/.well-known/nodeinfo';
2323

2424
try {
25-
$res = Http::withHeaders($headers)
25+
$res = Http::withOptions([
26+
'allow_redirects' => false,
27+
])
28+
->withHeaders($headers)
2629
->timeout(5)
2730
->get($wk);
2831
} catch (RequestException $e) {
@@ -61,7 +64,10 @@ public static function get($domain)
6164
}
6265

6366
try {
64-
$res = Http::withHeaders($headers)
67+
$res = Http::withOptions([
68+
'allow_redirects' => false,
69+
])
70+
->withHeaders($headers)
6571
->timeout(5)
6672
->get($href);
6773
} catch (RequestException $e) {

0 commit comments

Comments
 (0)