Now when users configure Authentik defaults in Settings, those values will automatically pre-fill when creating new proxy hosts, but can still be customized per host

also allow instant enable/disable of hosts directly from the table/list views without needing to edit each host
This commit is contained in:
fuomag9
2025-11-08 14:15:55 +01:00
parent b17ae54fbd
commit 70c5fa831c
11 changed files with 203 additions and 40 deletions

View File

@@ -15,6 +15,12 @@ export type GeneralSettings = {
acmeEmail?: string;
};
export type AuthentikSettings = {
outpostDomain: string;
outpostUpstream: string;
authEndpoint?: string;
};
export async function getSetting<T>(key: string): Promise<SettingValue<T>> {
const setting = await db.query.settings.findFirst({
where: (table, { eq }) => eq(table.key, key)
@@ -67,3 +73,11 @@ export async function getGeneralSettings(): Promise<GeneralSettings | null> {
export async function saveGeneralSettings(settings: GeneralSettings): Promise<void> {
await setSetting("general", settings);
}
export async function getAuthentikSettings(): Promise<AuthentikSettings | null> {
return await getSetting<AuthentikSettings>("authentik");
}
export async function saveAuthentikSettings(settings: AuthentikSettings): Promise<void> {
await setSetting("authentik", settings);
}