dayjs-config

This commit is contained in:
龚皓
2024-09-30 15:39:50 +08:00
parent e307cd7e94
commit d580f303d0
3 changed files with 14 additions and 12 deletions

View File

@@ -15,20 +15,20 @@ export default defineConfig({
},
server:{
// host:'192.168.28.44',
host:'127.0.0.1',
// host: '192.168.28.32',
// host:'192.168.28.44',
host: '127.0.0.1',
port: 5173,
open:true,
cors: true,
// proxy: {
// '/api': "192.168.28.44:8000"
// }
proxy: {
'/api': {
target: 'http://127.0.0.1:8000', // 目标 API 地址
changeOrigin: true, // 开启跨域
rewrite: path => path.replace('^/api/', '')
}
}
// proxy: {
// '/api': {
// target: 'http://192.168.28.33:8000',
// changeOrigin: true,
// rewrite: path => path.replace('^/api/', '')
// }
// }
}
})