vue.config.js中配置proxy代理https

target 要使用 Proxy 包装的目标

secure 安全证书校验
Referer 表示请求的来源(必填)
    
 proxy: {
      "/api": {
        target: 'https://example.com',
        changeOrigin: true, 
        secure: false,
        headers: {                  
          Referer: 'https://example.com'
        }
      },
 }

猜你喜欢

转载自www.cnblogs.com/roland-sky/p/12916645.html