mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 10:03:54 +08:00
update:通过代理转发接口api
This commit is contained in:
@@ -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 错误覆盖层
|
||||||
|
|||||||
Reference in New Issue
Block a user