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 = {
|
const common = {
|
||||||
plugins: [react(), eslint()],
|
plugins: [react(), eslint()],
|
||||||
server: {
|
server: {
|
||||||
|
// Proxy HTTP requests to the flask server
|
||||||
proxy: {
|
proxy: {
|
||||||
'/outputs': {
|
'/outputs': {
|
||||||
target: 'http://localhost:9090/outputs',
|
target: 'http://127.0.0.1:9090/outputs',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/outputs/, ''),
|
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: {
|
build: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user