非nginx调试模式

pull/27/head
StarsL.cn 2 years ago
parent 0baa27bcd8
commit 70b8e62bf9

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

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

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

Loading…
Cancel
Save