1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 【VUE 解决跨域问题】 proxyTable

【VUE 解决跨域问题】 proxyTable

时间:2019-08-30 16:46:26

相关推荐

【VUE 解决跨域问题】 proxyTable

proxyTable: {'/json': {target: 'http://kynprodimg.oss-cn-', //后台接口的服务地址changeOrigin: true, //changes the origin of the host header to the target URL 设置是否将host更换为代理urlws: true, //websocket是否代理secure: false, //true/false, if you want to verify the SSL Certs,https协议的情况下为truepathRewrite: { //object/function, rewrite target's url path. Object-keys will be used as RegExp to match paths. 重写url路径'^/json': '/json' //需要代理的路径}}},

'use strict'const merge = require('webpack-merge')const prodEnv = require('./prod.env')module.exports = merge(prodEnv, {NODE_ENV: '"development"',//BASE_URL: '"http://kyndevimg.oss-cn-/json/"'BASE_URL: '"/json"'})

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。