aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapp/Controllers/feedController.php4
-rw-r--r--app/Controllers/subscriptionController.php5
-rw-r--r--app/i18n/cs/sub.php2
-rw-r--r--app/i18n/de/sub.php2
-rw-r--r--app/i18n/el/sub.php2
-rw-r--r--app/i18n/en-us/sub.php2
-rw-r--r--app/i18n/en/sub.php2
-rw-r--r--app/i18n/es/sub.php2
-rw-r--r--app/i18n/fa/sub.php2
-rw-r--r--app/i18n/fr/sub.php2
-rw-r--r--app/i18n/he/sub.php2
-rw-r--r--app/i18n/hu/sub.php2
-rw-r--r--app/i18n/id/sub.php2
-rw-r--r--app/i18n/it/sub.php2
-rw-r--r--app/i18n/ja/sub.php2
-rw-r--r--app/i18n/ko/sub.php2
-rw-r--r--app/i18n/lv/sub.php2
-rw-r--r--app/i18n/nl/sub.php2
-rw-r--r--app/i18n/oc/sub.php2
-rw-r--r--app/i18n/pl/sub.php2
-rw-r--r--app/i18n/pt-br/sub.php2
-rw-r--r--app/i18n/ru/sub.php2
-rw-r--r--app/i18n/sk/sub.php2
-rw-r--r--app/i18n/tr/sub.php2
-rw-r--r--app/i18n/zh-cn/sub.php2
-rw-r--r--app/i18n/zh-tw/sub.php2
-rw-r--r--app/views/helpers/feed/update.phtml8
-rw-r--r--app/views/subscription/add.phtml8
28 files changed, 73 insertions, 0 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 9c4860521..c2d25821d 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -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,
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php
index fe228829a..225e93f95 100644
--- a/app/Controllers/subscriptionController.php
+++ b/app/Controllers/subscriptionController.php
@@ -146,6 +146,7 @@ class FreshRSS_subscription_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 !== '') {
$opts[CURLOPT_PROXY] = $proxy_address;
@@ -177,6 +178,10 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
}
}
+ if(!empty($headers)) {
+ $opts[CURLOPT_HTTPHEADER] = array_merge($headers, $opts[CURLOPT_HTTPHEADER] ?? []);
+ }
+
$feed->_attribute('curl_params', empty($opts) ? null : $opts);
$feed->_attribute('content_action', Minz_Request::paramString('content_action', true) ?: 'replace');
diff --git a/app/i18n/cs/sub.php b/app/i18n/cs/sub.php
index 352189e90..a9f7d198a 100644
--- a/app/i18n/cs/sub.php
+++ b/app/i18n/cs/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Akce filtrování',
'help' => 'Zapište jeden filtr hledání na řádek. Operátoři <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">viz dokumentace</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Informace',
'keep_min' => 'Minimální počet článků pro ponechání',
'kind' => array(
diff --git a/app/i18n/de/sub.php b/app/i18n/de/sub.php
index f1dbed6fb..958107e8a 100644
--- a/app/i18n/de/sub.php
+++ b/app/i18n/de/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filteraktionen',
'help' => 'Ein Suchfilter pro Zeile. Operatoren <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">siehe Dokumentation</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Information', // IGNORE
'keep_min' => 'Minimale Anzahl an Artikeln, die behalten wird',
'kind' => array(
diff --git a/app/i18n/el/sub.php b/app/i18n/el/sub.php
index b69bd8f4c..3d95d0e31 100644
--- a/app/i18n/el/sub.php
+++ b/app/i18n/el/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filter actions', // TODO
'help' => 'Write one search filter per line. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // TODO
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Information', // TODO
'keep_min' => 'Minimum number of articles to keep', // TODO
'kind' => array(
diff --git a/app/i18n/en-us/sub.php b/app/i18n/en-us/sub.php
index 84fdb2e4d..7c574f326 100644
--- a/app/i18n/en-us/sub.php
+++ b/app/i18n/en-us/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filter actions', // IGNORE
'help' => 'Write one search filter per line. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // IGNORE
),
+ 'http_headers' => 'HTTP Headers', // IGNORE
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // IGNORE
'information' => 'Information', // IGNORE
'keep_min' => 'Minimum number of articles to keep', // IGNORE
'kind' => array(
diff --git a/app/i18n/en/sub.php b/app/i18n/en/sub.php
index 397cdb99c..4c514ac0c 100644
--- a/app/i18n/en/sub.php
+++ b/app/i18n/en/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filter actions',
'help' => 'Write one search filter per line. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.',
),
+ 'http_headers' => 'HTTP Headers',
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
'information' => 'Information',
'keep_min' => 'Minimum number of articles to keep',
'kind' => array(
diff --git a/app/i18n/es/sub.php b/app/i18n/es/sub.php
index 21a21a879..853684712 100644
--- a/app/i18n/es/sub.php
+++ b/app/i18n/es/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filtrar acciones',
'help' => 'Escribir un filtro de búsqueda por línea. Ver <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">documentación de operadores de búsqueda</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Información',
'keep_min' => 'Número mínimo de artículos a conservar',
'kind' => array(
diff --git a/app/i18n/fa/sub.php b/app/i18n/fa/sub.php
index 735576e61..5dfd82c60 100644
--- a/app/i18n/fa/sub.php
+++ b/app/i18n/fa/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => ' اعمال فیلتر',
'help' => ' در هر خط یک فیلتر جستجو بنویسید. اپراتورها <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">مستندات را ببینید</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => ' اطلاعات',
'keep_min' => ' حداقل تعداد مقالات برای نگهداری',
'kind' => array(
diff --git a/app/i18n/fr/sub.php b/app/i18n/fr/sub.php
index c8ba35d89..4a8c21d69 100644
--- a/app/i18n/fr/sub.php
+++ b/app/i18n/fr/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filtres d’action',
'help' => 'Écrivez une recherche par ligne. Voir la <a href="https://freshrss.github.io/FreshRSS/fr/users/03_Main_view.html#gr%C3%A2ce-au-champ-de-recherche" target="_blank">documentation des opérateurs</a>.',
),
+ 'http_headers' => 'Entêtes HTTP',
+ 'http_headers_help' => 'Un entête HTTP par ligne, avec le nom et la valeur séparés par un deux-points (ex. : <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
'information' => 'Informations',
'keep_min' => 'Nombre minimum d’articles à conserver',
'kind' => array(
diff --git a/app/i18n/he/sub.php b/app/i18n/he/sub.php
index b7d67a308..bd5f2446d 100644
--- a/app/i18n/he/sub.php
+++ b/app/i18n/he/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filter actions', // TODO
'help' => 'Write one search filter per line. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // TODO
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'מידע',
'keep_min' => 'מסםר מינימלי של מאמרים לשמור',
'kind' => array(
diff --git a/app/i18n/hu/sub.php b/app/i18n/hu/sub.php
index 84e47fde9..c91a6c5b4 100644
--- a/app/i18n/hu/sub.php
+++ b/app/i18n/hu/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Szűrő műveletek',
'help' => 'Írj egy szűrőt soronként. Műveletek <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">a dokumentációban</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Információ',
'keep_min' => 'Megtartandó cikkek minimális száma',
'kind' => array(
diff --git a/app/i18n/id/sub.php b/app/i18n/id/sub.php
index 09354ab73..24a8dad2f 100644
--- a/app/i18n/id/sub.php
+++ b/app/i18n/id/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filter actions', // TODO
'help' => 'Write one search filter per line. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // TODO
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Information', // TODO
'keep_min' => 'Minimum number of articles to keep', // TODO
'kind' => array(
diff --git a/app/i18n/it/sub.php b/app/i18n/it/sub.php
index b6f4506c9..683785d45 100644
--- a/app/i18n/it/sub.php
+++ b/app/i18n/it/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Azioni di filtro',
'help' => 'Scrivi un filtro di ricerca per riga. Per li operatori <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">vedi la documentazione</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Informazioni',
'keep_min' => 'Numero minimo di articoli da mantenere',
'kind' => array(
diff --git a/app/i18n/ja/sub.php b/app/i18n/ja/sub.php
index ad1b18622..0395d78c9 100644
--- a/app/i18n/ja/sub.php
+++ b/app/i18n/ja/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'フィルターアクション',
'help' => '1行に1つの検索フィルターを設定してください。演算子は<a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">ドキュメントを参照してください</a>。',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'インフォメーション',
'keep_min' => '最小数の記事は保持されます',
'kind' => array(
diff --git a/app/i18n/ko/sub.php b/app/i18n/ko/sub.php
index 42a263fe8..00190e9c8 100644
--- a/app/i18n/ko/sub.php
+++ b/app/i18n/ko/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => '필터 동작',
'help' => '한 줄에 한 검색 필터를 작성해 주세요. 실행시 <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">문서 참고</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => '정보',
'keep_min' => '최소 유지 글 개수',
'kind' => array(
diff --git a/app/i18n/lv/sub.php b/app/i18n/lv/sub.php
index de86a6e08..bacc28500 100644
--- a/app/i18n/lv/sub.php
+++ b/app/i18n/lv/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filtra darbības',
'help' => 'Uzrakstiet vienu meklēšanas filtru katrā rindā. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Informācija',
'keep_min' => 'Minimālais saglabājamo izstrādājumu skaits',
'kind' => array(
diff --git a/app/i18n/nl/sub.php b/app/i18n/nl/sub.php
index c14ea5587..d624d01c4 100644
--- a/app/i18n/nl/sub.php
+++ b/app/i18n/nl/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filteracties',
'help' => 'Voer één zoekfilter per lijn in. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Informatie',
'keep_min' => 'Minimum aantal artikelen om te houden',
'kind' => array(
diff --git a/app/i18n/oc/sub.php b/app/i18n/oc/sub.php
index 12f14c00f..95e810171 100644
--- a/app/i18n/oc/sub.php
+++ b/app/i18n/oc/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filtre d’accion',
'help' => 'Escrivètz una recèrca per linha. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Informacions',
'keep_min' => 'Nombre minimum d’articles de servar',
'kind' => array(
diff --git a/app/i18n/pl/sub.php b/app/i18n/pl/sub.php
index f8bf7f2ff..13ad11bc3 100644
--- a/app/i18n/pl/sub.php
+++ b/app/i18n/pl/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Akcje filtrowania',
'help' => 'Jedno zapytanie na linię. Operatory opisane są w <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">dokumentacji</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Informacja',
'keep_min' => 'Minimalna liczba wiadomości do do przechowywania',
'kind' => array(
diff --git a/app/i18n/pt-br/sub.php b/app/i18n/pt-br/sub.php
index 581186309..d7fef476c 100644
--- a/app/i18n/pt-br/sub.php
+++ b/app/i18n/pt-br/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Ações do filtro',
'help' => 'Escreva um filtro de pesquisa por linha. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Informações',
'keep_min' => 'Número mínimo de artigos para manter',
'kind' => array(
diff --git a/app/i18n/ru/sub.php b/app/i18n/ru/sub.php
index ab747abb4..6f4a4da18 100644
--- a/app/i18n/ru/sub.php
+++ b/app/i18n/ru/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Действия фильтрации',
'help' => 'Введите по одному поисковому фильтру в строке. См. <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">документацию</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Информация',
'keep_min' => 'Оставлять статей не менее',
'kind' => array(
diff --git a/app/i18n/sk/sub.php b/app/i18n/sk/sub.php
index d0b1f5874..a3b9856cd 100644
--- a/app/i18n/sk/sub.php
+++ b/app/i18n/sk/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Filtrovať akcie',
'help' => 'Napíšte jeden výraz hľadania na riadok. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Informácia',
'keep_min' => 'Minimálny počet článkov na uchovanie',
'kind' => array(
diff --git a/app/i18n/tr/sub.php b/app/i18n/tr/sub.php
index a550017ab..c08132ce4 100644
--- a/app/i18n/tr/sub.php
+++ b/app/i18n/tr/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => 'Eylemi filtrele',
'help' => 'Her satıra tek bir arama filtresi yaz. <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">dökümantasyonu incele</a>.',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => 'Bilgi',
'keep_min' => 'En az tutulacak makale sayısı',
'kind' => array(
diff --git a/app/i18n/zh-cn/sub.php b/app/i18n/zh-cn/sub.php
index 36bbf115c..2ccd4bcf6 100644
--- a/app/i18n/zh-cn/sub.php
+++ b/app/i18n/zh-cn/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => '过滤动作',
'help' => '每行写一条过滤规则,过滤规则可见 <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">文档</a>。',
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => '信息',
'keep_min' => '至少保存的文章数',
'kind' => array(
diff --git a/app/i18n/zh-tw/sub.php b/app/i18n/zh-tw/sub.php
index f0997ef8f..56237d9ed 100644
--- a/app/i18n/zh-tw/sub.php
+++ b/app/i18n/zh-tw/sub.php
@@ -77,6 +77,8 @@ return array(
'_' => '過濾動作',
'help' => '每行寫一條過濾搜尋 Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
),
+ 'http_headers' => 'HTTP Headers', // TODO
+ 'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
'information' => '信息',
'keep_min' => '至少保存的文章數',
'kind' => array(
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index 7f0be0f0c..5a08d1a3e 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -749,6 +749,14 @@
</div>
<div class="form-group">
+ <label class="group-name" for="http_headers"><?= _t('sub.feed.http_headers') ?></label>
+ <div class="group-controls">
+ <textarea class="valid-json" id="http_headers" name="http_headers" rows="3" cols="64" spellcheck="false"><?= !empty($this->feed->attributeArray('curl_params')) ? implode(PHP_EOL, $this->feed->attributeArray('curl_params')[CURLOPT_HTTPHEADER]) : '' ?></textarea>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.http_headers_help') ?></p>
+ </div>
+ </div>
+
+ <div class="form-group">
<div class="group-controls">
<label class="checkbox" for="clear_cache">
<input type="checkbox" name="clear_cache" id="clear_cache" value="1"<?= $this->feed->attributeBoolean('clear_cache') ? ' checked="checked"' : '' ?> />
diff --git a/app/views/subscription/add.phtml b/app/views/subscription/add.phtml
index 2aefd3c3e..943fdc52b 100644
--- a/app/views/subscription/add.phtml
+++ b/app/views/subscription/add.phtml
@@ -353,6 +353,14 @@
</select>
</div>
</div>
+
+ <div class="form-group">
+ <label class="group-name" for="http_headers"><?= _t('sub.feed.http_headers') ?></label>
+ <div class="group-controls">
+ <textarea class="valid-json" id="http_headers" name="http_headers" rows="3" cols="64" spellcheck="false"></textarea>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.http_headers_help') ?></p>
+ </div>
+ </div>
</details>
<div class="form-group form-actions">