连接小班接口

This commit is contained in:
2025-11-27 20:18:03 +08:00
parent b841481243
commit df06a9e60e
5 changed files with 821 additions and 242 deletions

View File

@@ -8,11 +8,18 @@ export default defineConfig({
proxy: {
// 只要你请求以 /api 开头,就会被转发到目标服务器
'/api': {
target: 'http://192.168.1.254:9001',
target: 'http://192.168.1.196:9001',
changeOrigin: true,
// 如果后端路径本身就有 /api就不需要 rewrite
// 如果你希望把 /api 前缀去掉再转发,就打开下面这行:
// rewrite: (path) => path.replace(/^\/api/, ''),
},
'/photos':{
target: 'http://8.130.135.159:8084',
changeOrigin: true,
},
'/geoserver': {
// 注意:这里必须写 /geoserver 结尾,且没有拼写错误
target: 'http://8.130.135.159:8000/geoserver',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/geoserver/, '')
},
},
},