mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-18 13:24:37 -04:00
Add HTTP Headers option (#6820)
* Add new strings to lang files * Add HTTP headers field to feed forms * A few improvements --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
@@ -178,6 +178,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
|
||||
$proxy_type = Minz_Request::paramString('proxy_type');
|
||||
$request_method = Minz_Request::paramString('curl_method');
|
||||
$request_fields = Minz_Request::paramString('curl_fields', true);
|
||||
$headers = Minz_Request::paramTextToArray('http_headers');
|
||||
|
||||
$opts = [];
|
||||
if ($proxy_type !== '') {
|
||||
@@ -208,6 +209,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($headers)) {
|
||||
$opts[CURLOPT_HTTPHEADER] = array_merge($headers, $opts[CURLOPT_HTTPHEADER] ?? []);
|
||||
}
|
||||
|
||||
$attributes = [
|
||||
'curl_params' => empty($opts) ? null : $opts,
|
||||
|
||||
Reference in New Issue
Block a user