From ee175dd6169a016fc898fac62d046e22c205dec0 Mon Sep 17 00:00:00 2001 From: Eris <36680203+printfuck@users.noreply.github.com> Date: Sat, 16 Jan 2021 16:32:18 -0500 Subject: 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 Co-authored-by: Aeris Co-authored-by: Alexandre Alapetite --- app/Models/Entry.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 2f43c19cd..784576455 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -376,7 +376,13 @@ class FreshRSS_Entry extends Minz_Model { CURLOPT_FOLLOWLOCATION => true, CURLOPT_ENCODING => '', //Enable all encodings ]); + curl_setopt_array($ch, FreshRSS_Context::$system_conf->curl_options); + + if (isset($attributes['curl_params']) && is_array($attributes['curl_params'])) { + curl_setopt_array($ch, $attributes['curl_params']); + } + if (isset($attributes['ssl_verify'])) { curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $attributes['ssl_verify'] ? 2 : 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $attributes['ssl_verify'] ? true : false); -- cgit v1.2.3