Use own ua for url unfurling
authorjoshuaruesweg <ruesweg@woltlab.com>
Fri, 5 Mar 2021 10:12:35 +0000 (11:12 +0100)
committerjoshuaruesweg <ruesweg@woltlab.com>
Tue, 16 Mar 2021 15:19:14 +0000 (16:19 +0100)
wcfsetup/install/files/lib/system/message/unfurl/UnfurlResponse.class.php

index abd3b70fae27372c859ce073a42b23e91f4521e1..09d8a3f1f068f6f71295b02e98b363d4159b91ea 100644 (file)
@@ -337,6 +337,9 @@ final class UnfurlResponse
             self::$httpClient = HttpFactory::makeClient([
                 RequestOptions::TIMEOUT => 10,
                 RequestOptions::STREAM => true,
+                RequestOptions::HEADERS => [
+                    'user-agent' => HttpFactory::getDefaultUserAgent("UrlUnfurling"),
+                ],
             ]);
         }