@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 07:15 UTC

main
mjs 18 lines 497 Bytes
Raw
1 // Selected via `config: "vite.proxy.config.mjs"` by the local suite: the
2 // dev server proxies `/api/*` to a target the stack resolves from another
3 // resource's `Output` and hands over through the site's `env`.
4 const target = process.env.API_PROXY_TARGET;
5
6 export default {
7 server: {
8 proxy: target
9 ? {
10 "/api": {
11 target,
12 changeOrigin: true,
13 rewrite: (path) => path.replace(/^\/api/, ""),
14 },
15 }
16 : undefined,
17 },
18 };