mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-25 00:35:40 -04:00
CURLOPT parameters per feed (#3367)
* Working curlopt_params * Examples * curl_params for fetching the article * cleanup * clarification * Remove debugging * Options corrected * Removed Debugging * i18n not needed (right now) * Translations and UI rework * Checks in update.phtml * Unset Proxy&Cookies * remove clutter * minor fuckup * i18n added properly * resolve Errors * linting errors * linting errors, again * Review * Minor revert * Minor i18n: de Co-authored-by: maru <maru@nyx.im> Co-authored-by: Aeris <a3x@eris.cc> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user