Configuring a proxy so we can test from mobile

This commit is contained in:
Filipi Fuchter
2025-01-16 11:02:53 -03:00
parent ea1323723d
commit 119c0da299
2 changed files with 14 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ class ChatbotClient {
}
async fetchRoomInfo() {
let connectUrl = 'http://0.0.0.0:7860/connect'
let connectUrl = '/connect'
let res = await fetch(connectUrl, {
method: "POST",
mode: "cors",

View File

@@ -0,0 +1,13 @@
import { defineConfig } from 'vite';
export default defineConfig({
server: {
proxy: {
// Proxy /api requests to the backend server
'/connect': {
target: 'http://0.0.0.0:7860', // Replace with your backend URL
changeOrigin: true,
},
},
},
});