feat: add header passthrough

This commit is contained in:
Seefs
2026-02-05 01:43:49 +08:00
parent ca91d6992e
commit f3e6585441
8 changed files with 194 additions and 5 deletions

View File

@@ -3113,6 +3113,28 @@ const EditChannelModal = (props) => {
extraText={
<div className='flex flex-col gap-1'>
<div className='flex gap-2 flex-wrap items-center'>
<Text
className='!text-semi-color-primary cursor-pointer'
onClick={() =>
handleInputChange(
'header_override',
JSON.stringify(
{
'*': true,
're:^X-Trace-.*$': true,
'X-Foo': '{client_header:X-Foo}',
Authorization: 'Bearer {api_key}',
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0',
},
null,
2,
),
)
}
>
{t('填入模板')}
</Text>
<Text
className='!text-semi-color-primary cursor-pointer'
onClick={() =>
@@ -3120,9 +3142,7 @@ const EditChannelModal = (props) => {
'header_override',
JSON.stringify(
{
'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0',
Authorization: 'Bearer{api_key}',
'*': true,
},
null,
2,
@@ -3130,7 +3150,7 @@ const EditChannelModal = (props) => {
)
}
>
{t('填入模板')}
{t('填入透传模版')}
</Text>
<Text
className='!text-semi-color-primary cursor-pointer'

View File

@@ -739,6 +739,8 @@
"填入": "Fill",
"填入所有模型": "Fill in all models",
"填入模板": "Fill Template",
"填入透传模版": "Fill Passthrough Template",
"填入透传完整模版": "Fill Full Passthrough Template",
"填入相关模型": "Fill Related Models",
"填写Gotify服务器的完整URL地址": "Fill in the complete URL address of the Gotify server",
"填写带https的域名逗号分隔": "Fill in domains with https, separated by commas",

View File

@@ -744,6 +744,8 @@
"填入": "Remplir",
"填入所有模型": "Remplir tous les modèles",
"填入模板": "Remplir le modèle",
"填入透传模版": "Remplir le modèle passthrough",
"填入透传完整模版": "Remplir le modèle passthrough complet",
"填入相关模型": "Remplir les modèles associés",
"填写Gotify服务器的完整URL地址": "Remplir l'adresse URL complète du serveur Gotify",
"填写带https的域名逗号分隔": "Saisir les domaines avec https, séparés par des virgules",

View File

@@ -735,6 +735,8 @@
"填入": "入力",
"填入所有模型": "すべてのモデルを入力",
"填入模板": "テンプレートを入力",
"填入透传模版": "パススルーテンプレートを入力",
"填入透传完整模版": "完全なパススルーテンプレートを入力",
"填入相关模型": "関連モデルを入力",
"填写Gotify服务器的完整URL地址": "Gotifyサーバーの完全なURLを入力してください",
"填写带https的域名逗号分隔": "https://を含むドメインをカンマ区切りで入力してください",

View File

@@ -750,6 +750,8 @@
"填入": "Заполнить",
"填入所有模型": "Заполнить все модели",
"填入模板": "Заполнить шаблон",
"填入透传模版": "Заполнить шаблон passthrough",
"填入透传完整模版": "Заполнить полный шаблон passthrough",
"填入相关模型": "Заполнить связанные модели",
"填写Gotify服务器的完整URL地址": "Введите полный URL-адрес сервера Gotify",
"填写带https的域名逗号分隔": "Введите домены с https, разделённые запятыми",

View File

@@ -736,6 +736,8 @@
"填入": "Điền",
"填入所有模型": "Điền tất cả mô hình",
"填入模板": "Điền mẫu",
"填入透传模版": "Điền mẫu truyền qua",
"填入透传完整模版": "Điền mẫu truyền qua đầy đủ",
"填入相关模型": "Điền mô hình liên quan",
"填写Gotify服务器的完整URL地址": "Điền địa chỉ URL đầy đủ của máy chủ Gotify",
"填写带https的域名逗号分隔": "Điền tên miền có https, phân tách bằng dấu phẩy",

View File

@@ -735,6 +735,8 @@
"填入": "填入",
"填入所有模型": "填入所有模型",
"填入模板": "填入模板",
"填入透传模版": "填入透传模版",
"填入透传完整模版": "填入透传完整模版",
"填入相关模型": "填入相关模型",
"填写Gotify服务器的完整URL地址": "填写Gotify服务器的完整URL地址",
"填写带https的域名逗号分隔": "填写带https的域名逗号分隔",