Update nuxt.config.js

This commit is contained in:
ronger 2022-09-30 10:57:31 +08:00 committed by GitHub
parent f01dcabc00
commit 43ac56bc46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ export default {
proxy: [ //proxy配置 proxy: [ //proxy配置
['/api', { ['/api', {
target: apiConfig.BASE, //api请求路径 target: apiConfig.BASE, //api请求路径
pathRewrite: {'^/api': isDevMode ? '/api' : '/api'} //重定向请求路径防止路由、api路径的冲突 pathRewrite: {'^/api': isDevMode ? '/api/v1' : '/api'} //重定向请求路径防止路由、api路径的冲突
}], }],
['/ws', { ['/ws', {
target: apiConfig.BASE //api请求路径 target: apiConfig.BASE //api请求路径