towards multi-user
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import { defineConfig } from "astro/config";
|
||||
import { loadEnv } from "vite";
|
||||
import svelte from "@astrojs/svelte";
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
|
||||
const env = loadEnv(process.env.NODE_ENV ?? 'development', process.cwd(), '');
|
||||
const serveTarget = env.PUBLIC_EDIT_URL || 'http://localhost:4041';
|
||||
|
||||
export default defineConfig({
|
||||
integrations: [svelte(), tailwind()],
|
||||
devToolbar: { enabled: false },
|
||||
@@ -14,5 +18,15 @@ export default defineConfig({
|
||||
esbuildOptions: { target: 'es2022' },
|
||||
},
|
||||
build: { target: 'es2022' },
|
||||
// Proxy /api/* to bincio serve/edit so cookies work same-origin in dev.
|
||||
// In production nginx handles this — same pattern, no code change needed.
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: serveTarget,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user