not working: attempt to stream in websocket
added Vite proxy, tested with websocat, with direct js websocket. the error seems to be Laminex related
This commit is contained in:
@@ -3,4 +3,16 @@ import scalaJSPlugin from "@scala-js/vite-plugin-scalajs";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [scalaJSPlugin()],
|
||||
server: {
|
||||
proxy: {
|
||||
// Proxy all requests starting with /api to your backend server
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
ws: true, // Enable WebSocket proxying
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user