Skip to content

Commit 8abd4a9

Browse files
committed
fix(Download) set user agent explicitly
1 parent 96cb825 commit 8abd4a9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Utils/Download.php

+7
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ public static function fileFromUrl(
4141
curl_setopt($curlHandle, CURLOPT_TIMEOUT, 120);
4242
curl_setopt($curlHandle, CURLOPT_FILE, $file);
4343

44+
// Set the user agent header.
45+
curl_setopt(
46+
$curlHandle,
47+
CURLOPT_USERAGENT,
48+
'Mozilla/5.0 (compatible; Embedded MySql; +https://github.com/lucatume/wp-browser'
49+
);
50+
4451
if (!$verifyHost) {
4552
/** @noinspection CurlSslServerSpoofingInspection */
4653
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 0);

0 commit comments

Comments
 (0)