fix(sso): apply trusted origin changes without server restart

This commit is contained in:
Mauricio Siu
2026-07-09 01:46:32 -06:00
parent 995a04d30f
commit b3621bcfff
3 changed files with 48 additions and 28 deletions

View File

@@ -120,6 +120,10 @@ export const getDokployUrl = async () => {
const TRUSTED_ORIGINS_CACHE_TTL_MS = 30 * 60_000;
let trustedOriginsCache: { data: string[]; expiresAt: number } | null = null;
export const invalidateTrustedOriginsCache = () => {
trustedOriginsCache = null;
};
export const getTrustedOrigins = async () => {
const runQuery = async () => {
const rows = await db