uniApp配置代理devServer 解决页面跳转跨域

manifest.json文件中添加

"devServer" : {

            "https" : false,

            "port" : 9100,

            "proxy" : {

                "/api" : {

                    "target" : "http://aaa",

                    "changeOrigin" : true,

                    "secure" : false,

                    "pathRewrite" : {

                        "^/api" : "/"

                    }

                }

            }

        }

    }

你可能感兴趣的:(http,html,javascript)