mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-01 03:31:58 +00:00
Allow disabling proxy of /template path via env (#3773)
This commit is contained in:
@@ -18,6 +18,7 @@ const IS_DEV = process.env.NODE_ENV === 'development'
|
||||
const SHOULD_MINIFY = process.env.ENABLE_MINIFY === 'true'
|
||||
// vite dev server will listen on all addresses, including LAN and public addresses
|
||||
const VITE_REMOTE_DEV = process.env.VITE_REMOTE_DEV === 'true'
|
||||
const DISABLE_TEMPLATES_PROXY = process.env.DISABLE_TEMPLATES_PROXY === 'true'
|
||||
|
||||
const DEV_SERVER_COMFYUI_URL =
|
||||
process.env.DEV_SERVER_COMFYUI_URL || 'http://127.0.0.1:8188'
|
||||
@@ -52,9 +53,13 @@ export default defineConfig({
|
||||
target: DEV_SERVER_COMFYUI_URL
|
||||
},
|
||||
|
||||
'/templates': {
|
||||
target: DEV_SERVER_COMFYUI_URL
|
||||
},
|
||||
...(!DISABLE_TEMPLATES_PROXY
|
||||
? {
|
||||
'/templates': {
|
||||
target: DEV_SERVER_COMFYUI_URL
|
||||
}
|
||||
}
|
||||
: {}),
|
||||
|
||||
'/testsubrouteindex': {
|
||||
target: 'http://localhost:5173',
|
||||
|
||||
Reference in New Issue
Block a user