aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/subscriptionController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/subscriptionController.php')
-rw-r--r--app/Controllers/subscriptionController.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php
index 6c03084c3..7435f70b2 100644
--- a/app/Controllers/subscriptionController.php
+++ b/app/Controllers/subscriptionController.php
@@ -112,6 +112,19 @@ class FreshRSS_subscription_Controller extends Minz_ActionController {
$feed->_attributes('read_upon_reception', Minz_Request::paramTernary('read_upon_reception'));
$feed->_attributes('clear_cache', Minz_Request::paramTernary('clear_cache'));
+ $cookie = Minz_Request::param('curl_params_cookie', '');
+ $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])) {
+ $opts[CURLOPT_PROXY] = $proxy_address;
+ $opts[CURLOPT_PROXYTYPE] = intval($proxy_type);
+ }
+ if ($cookie != '') {
+ $opts[CURLOPT_COOKIE] = $cookie;
+ }
+ $feed->_attributes('curl_params', empty($opts) ? null : $opts);
+
if (FreshRSS_Auth::hasAccess('admin')) {
$feed->_attributes('ssl_verify', Minz_Request::paramTernary('ssl_verify'));
$timeout = intval(Minz_Request::param('timeout', 0));