diff --git a/apps/frontend/.env.example b/apps/frontend/.env.example index d9a0c17..ba675d4 100644 --- a/apps/frontend/.env.example +++ b/apps/frontend/.env.example @@ -1 +1,2 @@ TURNSTILE_PUBLIC=1x00000000000000000000AA +DEV_API_TARGET=http://localhost:8000 diff --git a/apps/frontend/nuxt.config.ts b/apps/frontend/nuxt.config.ts index 25af62f..61552b8 100644 --- a/apps/frontend/nuxt.config.ts +++ b/apps/frontend/nuxt.config.ts @@ -99,14 +99,17 @@ export default defineNuxtConfig({ name: 'Blueprint', }, nitro: { + // Allow switching dev API target via DEV_API_TARGET (e.g., https://blueprint.zip) + // Falls back to local backend when unset. devProxy: { '/api': { - // Change to https://blueprint.zip/api to use the production API - // Local API is http://localhost:8000/api - target: 'http://localhost:8000/api', + target: process.env.DEV_API_TARGET?.replace(/\/$/, '') || 'http://localhost:8000', + changeOrigin: true, + }, + '/browse/sitemap.xml': { + target: process.env.DEV_API_TARGET?.replace(/\/$/, '') || 'http://localhost:8000', changeOrigin: true, }, - '/browse/sitemap.xml': 'http://localhost:8000/browse/sitemap.xml', '/yay': 'https://blueprint.zip/yay', }, routeRules: { diff --git a/apps/frontend/src/components/ui/browse/Filters.vue b/apps/frontend/src/components/ui/browse/Filters.vue index f320946..aad59b8 100644 --- a/apps/frontend/src/components/ui/browse/Filters.vue +++ b/apps/frontend/src/components/ui/browse/Filters.vue @@ -27,6 +27,35 @@ + +