add chat url in env

This commit is contained in:
nemo 2024-06-17 15:53:28 +01:00
parent b61f410022
commit ddb4d49105
2 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ VITE_OBP_REDIS_URL = redis://127.0.0.1:6379
# Enable the chatbot interface "Opey"
VITE_CHATBOT_ENABLED=false
VITE_CHATBOT_ENDPOINT_URL=http://localhost:5000
# Product styling setting
#VITE_OBP_LINKS_COLOR="#52b165"

View File

@ -43,6 +43,11 @@ export default defineConfig({
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
'^/opey': {
target: import.meta.env.VITE_CHATBOT_ENDPOINT_URL,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/opey/, ''),
},
},
},
})