feat: add header passthrough

This commit is contained in:
Seefs
2026-02-05 01:43:49 +08:00
parent b564194f92
commit 5ff96de421
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'