]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Proxy.php
Catch exceptions for Worker::AddContact()
[friendica.git] / src / Util / Proxy.php
index 443725a3d88f334c5ebe440ac60de0efb5db7d12..16f635e3a04b402e1ac8255f8ced3a2a72589db5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -75,13 +75,17 @@ class Proxy
         * provided URL isn't local
         *
         * @param string $url       The URL to proxyfy
-        * @param string $size      One of the ProxyUtils::SIZE_* constants
+        * @param string $size      One of the Proxy::SIZE_* constants
         *
         * @return string The proxyfied URL or relative path
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        public static function proxifyUrl($url, $size = '')
        {
+               if (!DI::config()->get('system', 'proxify_content')) {
+                       return $url;
+               }
+
                // Trim URL first
                $url = trim($url);