merge BASE_URL and BASE_PASH into ROOT_URL

This commit is contained in:
bytedream committed 2026-10-31 03:18:42 +01:00
1 parent e0a0b188ad
commit e22c664aae
22 files changed
+56 -46

No files matched your search

+2 -3
View File
@@ -11,7 +11,7 @@ import node from '@astrojs/node';
export default defineConfig({
output: 'server',
prefetch: true,
base: process.env.BASE_PATH ?? undefined,
base: process.env.ROOT_URL ? new URL(process.env.ROOT_URL).pathname.replace(/^\/+/, '') : undefined,
security: {
checkOrigin: false
@@ -54,8 +54,7 @@ export default defineConfig({
DATABASE_URI: envField.string({ context: 'server', access: 'secret' }),
BASE_HOST: envField.string({ context: 'server', access: 'secret', default: 'http://localhost:4321' }),
BASE_PATH: envField.string({ context: 'server', access: 'secret', default: '/' }),
ROOT_URL: envField.string({ context: 'server', access: 'secret', default: 'http://localhost:4321' }),
OPENXBL_API_KEY: envField.string({ context: 'server', access: 'secret', optional: true })
}