From 2626870396f1130578e06d829e10375061d94dff Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Fri, 6 Feb 2026 23:44:50 +0000 Subject: [PATCH] Use localhost as dev origin instead of devvm.viktorbarzin.lan DEV_HOST env var now controls the hostname, defaulting to localhost. This makes the dev setup work on any machine without requiring a specific DNS entry. --- crawler/api/config.py | 2 +- crawler/frontend/src/auth/config.ts | 2 +- crawler/frontend/vite.config.ts | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crawler/api/config.py b/crawler/api/config.py index 03d777b..df8a622 100644 --- a/crawler/api/config.py +++ b/crawler/api/config.py @@ -12,5 +12,5 @@ OIDC_CACHE_TTL = timedelta( hours=1 ).total_seconds() # Cache to avoid spamming authentik with requests -DEV_TIER_ORIGINS = ["https://devvm.viktorbarzin.lan/"] +DEV_TIER_ORIGINS = ["https://localhost/"] PROD_TIER_ORIGINS = ["https://wrongmove.viktorbarzin.me/"] diff --git a/crawler/frontend/src/auth/config.ts b/crawler/frontend/src/auth/config.ts index 887df24..d57b8f2 100644 --- a/crawler/frontend/src/auth/config.ts +++ b/crawler/frontend/src/auth/config.ts @@ -3,7 +3,7 @@ import { WebStorageStateStore } from "oidc-client-ts"; export const oidcConfig = { authority: "https://authentik.viktorbarzin.me/application/o/wrongmove/", client_id: "5AJKRgcdgVm1OyApBzFkadDFfStW9a555zwv2MOe", - redirect_uri: import.meta.env.MODE === 'development' ? "https://devvm.viktorbarzin.lan/callback" : "https://wrongmove.viktorbarzin.me/callback", + redirect_uri: import.meta.env.MODE === 'development' ? "https://localhost/callback" : "https://wrongmove.viktorbarzin.me/callback", userStore: new WebStorageStateStore({ store: window.localStorage }), response_type: 'code', // PKCE flow (recommended for SPAs) scope: 'openid profile email', // Requested scopes diff --git a/crawler/frontend/vite.config.ts b/crawler/frontend/vite.config.ts index 2511867..6d5489b 100644 --- a/crawler/frontend/vite.config.ts +++ b/crawler/frontend/vite.config.ts @@ -18,9 +18,7 @@ export default defineConfig({ server: { allowedHosts: [ env.DEV_HOST ?? 'localhost', - // Add more hosts here 'wrongmove.viktorbarzin.me', - 'devvm.viktorbarzin.lan' ], } })