Browse Source

Update NodeinfoService, disable redirects

Daniel Supernault 1 year ago
parent
commit
240e6bbe4f
1 changed files with 8 additions and 2 deletions
  1. 8 2
      app/Services/NodeinfoService.php

+ 8 - 2
app/Services/NodeinfoService.php

@@ -22,7 +22,10 @@ class NodeinfoService
         $wk = $url . '/.well-known/nodeinfo';
         $wk = $url . '/.well-known/nodeinfo';
 
 
         try {
         try {
-            $res = Http::withHeaders($headers)
+            $res = Http::withOptions([
+                'allow_redirects' => false,
+            ])
+            ->withHeaders($headers)
             ->timeout(5)
             ->timeout(5)
             ->get($wk);
             ->get($wk);
         } catch (RequestException $e) {
         } catch (RequestException $e) {
@@ -61,7 +64,10 @@ class NodeinfoService
         }
         }
 
 
         try {
         try {
-            $res = Http::withHeaders($headers)
+            $res = Http::withOptions([
+                'allow_redirects' => false,
+            ])
+            ->withHeaders($headers)
             ->timeout(5)
             ->timeout(5)
             ->get($href);
             ->get($href);
         } catch (RequestException $e) {
         } catch (RequestException $e) {