mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 21:17:24 +08:00
add config auth location
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
max-height: 240px;
|
||||
overflow-y: auto;
|
||||
white-space: pre-wrap;
|
||||
min-width: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -249,6 +249,30 @@ export function PluginPage() {
|
||||
<option value="custom">{Locale.Plugin.Auth.Custom}</option>
|
||||
</select>
|
||||
</ListItem>
|
||||
{["bearer", "basic", "custom"].includes(
|
||||
editingPlugin.authType as string,
|
||||
) && (
|
||||
<ListItem title={Locale.Plugin.Auth.Location}>
|
||||
<select
|
||||
value={editingPlugin?.authLocation}
|
||||
onChange={(e) => {
|
||||
pluginStore.updatePlugin(editingPlugin.id, (plugin) => {
|
||||
plugin.authLocation = e.target.value;
|
||||
});
|
||||
}}
|
||||
>
|
||||
<option value="header">
|
||||
{Locale.Plugin.Auth.LocationHeader}
|
||||
</option>
|
||||
<option value="query">
|
||||
{Locale.Plugin.Auth.LocationQuery}
|
||||
</option>
|
||||
<option value="body">
|
||||
{Locale.Plugin.Auth.LocationBody}
|
||||
</option>
|
||||
</select>
|
||||
</ListItem>
|
||||
)}
|
||||
{editingPlugin.authType == "custom" && (
|
||||
<ListItem title={Locale.Plugin.Auth.CustomHeader}>
|
||||
<input
|
||||
|
Reference in New Issue
Block a user