Error occurred while proxying request localhost:端口 报错500的解决方法

    '/AuthServer/api/': {
      target: 'https://localhost:44319',
      secure:false,// 这是签名认证,http和https区分的参数设置
      changeOrigin: true,
      pathRewrite: { '^/AuthServer': '' },
    },

可能是本地调试的时候,使用了https,代理的时候去做了安全证书验证,调试的时候可以把 secure设置成false

 

Visual Studio Code报如下错误:

Error occurred while proxying request localhost:8000/api/account/login to https://localhost:44319/ [DEPTH_ZERO_SELF_SIGNED_CERT] (https://nodejs.org/api/errors.html#errors_common_system_errors)

posted @ 2023-01-06 13:21  小杨观世界  阅读(1800)  评论(0编辑  收藏  举报