mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-31 12:45:40 -04:00
Fix duplicate HTTP header for POST (#7556)
Using POST with JSON would add `Content-Type: application/json` again and again everytime the feed's settings were saved
This commit is contained in:
committed by
GitHub
parent
2063e445af
commit
b2f80ad00a
@@ -215,6 +215,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
|
||||
$headers = array_filter(array_map('trim', $headers));
|
||||
if (!empty($headers)) {
|
||||
$opts[CURLOPT_HTTPHEADER] = array_merge($headers, $opts[CURLOPT_HTTPHEADER] ?? []);
|
||||
$opts[CURLOPT_HTTPHEADER] = array_unique($opts[CURLOPT_HTTPHEADER]);
|
||||
}
|
||||
|
||||
$attributes = [
|
||||
|
||||
Reference in New Issue
Block a user