]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Proxy.php
Use rawContent for Special Options to avoid a protected options() method
[friendica.git] / src / Module / Proxy.php
index a9c8c0b9e6361e6fce9a9d685feb516694296128..419289c39f6e2927b57871c20abec77e89d39880 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
  *
@@ -44,9 +44,9 @@ class Proxy extends BaseModule
        /**
         * Fetch remote image content
         */
-       public static function rawContent()
+       protected function rawContent(array $request = [])
        {
-               $request = self::getRequestInfo();
+               $request = $this->getRequestInfo();
 
                if (!DI::config()->get('system', 'proxify_content')) {
                        Logger::notice('Proxy access is forbidden', ['request' => $request, 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '', 'accept' => $_SERVER['HTTP_ACCEPT'] ?? '']);
@@ -119,13 +119,13 @@ class Proxy extends BaseModule
         *    ]
         * @throws \Exception
         */
-       private static function getRequestInfo()
+       private function getRequestInfo()
        {
                $size = ProxyUtils::PIXEL_LARGE;
                $sizetype = '';
 
-               if (!empty(static::$parameters['url']) && empty($_REQUEST['url'])) {
-                       $url = static::$parameters['url'];
+               if (!empty($this->parameters['url']) && empty($_REQUEST['url'])) {
+                       $url = $this->parameters['url'];
 
                        // thumb, small, medium and large.
                        if (substr($url, -6) == ':micro') {