mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
update:通过代理转发接口api
This commit is contained in:
parent
703ecfae40
commit
03d89d22ec
2 changed files with 5 additions and 4 deletions
|
|
@ -1,4 +1 @@
|
||||||
# 暂时使用群主的接口
|
VUE_APP_API_BASE_URL=/xiaozhi
|
||||||
# VUE_APP_API_BASE_URL=https://2662r3426b.vicp.fun/xiaozhi
|
|
||||||
# 如果本地开发,请使用以下接口
|
|
||||||
VUE_APP_API_BASE_URL=http://localhost:8002/xiaozhi
|
|
||||||
|
|
@ -15,6 +15,10 @@ module.exports = defineConfig({
|
||||||
devServer: {
|
devServer: {
|
||||||
port: 8001, // 指定端口为 8001
|
port: 8001, // 指定端口为 8001
|
||||||
proxy: {
|
proxy: {
|
||||||
|
'/xiaozhi': {
|
||||||
|
target: 'http://127.0.0.1:8002',
|
||||||
|
changeOrigin: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
client: {
|
client: {
|
||||||
overlay: false, // 不显示 webpack 错误覆盖层
|
overlay: false, // 不显示 webpack 错误覆盖层
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue