非nginx调试模式

This commit is contained in:
StarsL.cn 2022-07-17 23:14:29 +08:00
parent 0baa27bcd8
commit 70b8e62bf9
3 changed files with 14 additions and 0 deletions

View File

@ -13,6 +13,9 @@ from units.avd import avd_list
from units.jms import sync_jms
app = Flask(__name__)
#非nginx调试解决跨域CORS问题
#CORS(app, supports_credentials=True)
app.register_blueprint(login.blueprint)
app.register_blueprint(blackbox.blueprint)
app.register_blueprint(consul.blueprint)

View File

@ -8,6 +8,8 @@ const service = axios.create({
// baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
baseURL: '',
// 非nginx调试填写后端的信息。
// baseURL: 'http://192.168.1.120:2026',
timeout: 10000 // request timeout
})

View File

@ -36,6 +36,15 @@ module.exports = {
warnings: false,
errors: true
},
// 非nginx调试使用代理后端模式。
// proxy:{
// 'api':{
// target:'http://192.168.1.120:2026',
// changeOrigin: true,
// }
// },
before: require('./mock/mock-server.js')
},
configureWebpack: {