Skip to content

a problem with proxy of 'CERT_HAS_EXPIRED' #331

@lemondreamtobe

Description

@lemondreamtobe

Today, I get a problem with http-proxy-middleware.
show my code follow:

const proxy = require('http-proxy-middleware');

module.exports = function (app) {
  app.use(
    proxy('/api/weather', {
      target: 'https://restapi.amap.com/v3/weather/weatherInfo',
      changeOrigin: true,
      secure: false,
      pathRewrite: {
        '^/api/weather': ''
      }
    })
  );
...

and the result of web browser
image
image

and the log of server
image

so how can i fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions