Просмотр исходного кода

Fix disabling proxy (#5082)

#fix https://github.com/FreshRSS/FreshRSS/issues/5081
Allow disabling curl proxy for specific feed, when proxy is defined globally
Alexandre Alapetite 3 лет назад
Родитель
Сommit
64d68a691c
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      app/Controllers/feedController.php
  2. 1 1
      app/Controllers/subscriptionController.php

+ 1 - 1
app/Controllers/feedController.php

@@ -172,7 +172,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
 			$proxy_address = Minz_Request::param('curl_params', '');
 			$proxy_type = Minz_Request::param('proxy_type', '');
 			$opts = [];
-			if ($proxy_address !== '' && $proxy_type !== '' && in_array($proxy_type, [0, 2, 4, 5, 6, 7])) {
+			if ($proxy_type !== '') {
 				$opts[CURLOPT_PROXY] = $proxy_address;
 				$opts[CURLOPT_PROXYTYPE] = intval($proxy_type);
 			}

+ 1 - 1
app/Controllers/subscriptionController.php

@@ -147,7 +147,7 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
 			$proxy_address = Minz_Request::param('curl_params', '');
 			$proxy_type = Minz_Request::param('proxy_type', '');
 			$opts = [];
-			if ($proxy_address !== '' && $proxy_type !== '' && in_array($proxy_type, [0, 2, 4, 5, 6, 7])) {
+			if ($proxy_type !== '') {
 				$opts[CURLOPT_PROXY] = $proxy_address;
 				$opts[CURLOPT_PROXYTYPE] = intval($proxy_type);
 			}