diff options
Diffstat (limited to 'app/Controllers/feedController.php')
| -rwxr-xr-x | app/Controllers/feedController.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 95bca33eb..00759bd18 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -165,6 +165,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $http_auth = $user . ':' . $pass; } + $cookie = Minz_Request::param('curl_params_cookie', ''); + $cookie_file = Minz_Request::paramBoolean('curl_params_cookiefile'); + $max_redirs = intval(Minz_Request::param('curl_params_redirects', 0)); $useragent = Minz_Request::param('curl_params_useragent', ''); $proxy_address = Minz_Request::param('curl_params', ''); $proxy_type = Minz_Request::param('proxy_type', ''); @@ -173,6 +176,18 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $opts[CURLOPT_PROXY] = $proxy_address; $opts[CURLOPT_PROXYTYPE] = intval($proxy_type); } + if ($cookie !== '') { + $opts[CURLOPT_COOKIE] = $cookie; + } + if ($cookie_file) { + // Pass empty cookie file name to enable the libcurl cookie engine + // without reading any existing cookie data. + $opts[CURLOPT_COOKIEFILE] = ''; + } + if ($max_redirs != 0) { + $opts[CURLOPT_MAXREDIRS] = $max_redirs; + $opts[CURLOPT_FOLLOWLOCATION] = 1; + } if ($useragent !== '') { $opts[CURLOPT_USERAGENT] = $useragent; } |
