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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user