mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes vite dev
by proxying socket.io
This commit is contained in:
parent
40430ad29c
commit
3902c467b9
@ -7,12 +7,18 @@ export default defineConfig(({ mode }) => {
|
||||
const common = {
|
||||
plugins: [react(), eslint()],
|
||||
server: {
|
||||
// Proxy HTTP requests to the flask server
|
||||
proxy: {
|
||||
'/outputs': {
|
||||
target: 'http://localhost:9090/outputs',
|
||||
target: 'http://127.0.0.1:9090/outputs',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/outputs/, ''),
|
||||
},
|
||||
// Proxy socket.io to the flask-socketio server
|
||||
'/socket.io': {
|
||||
target: 'ws://127.0.0.1:9090',
|
||||
ws: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
|
Loading…
Reference in New Issue
Block a user