Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-signed certificate directions result in TypeScript errors #471

Open
lancegliser opened this issue Nov 12, 2020 · 2 comments
Open

Self-signed certificate directions result in TypeScript errors #471

lancegliser opened this issue Nov 12, 2020 · 2 comments

Comments

@lancegliser
Copy link

Reference: https://github.com/villadora/express-http-proxy#q-how-to-ignore-self-signed-certificates-

As of this issue, it states:

app.use('/', proxy('internalhost.example.com', {
  proxyReqOptDecorator: function(proxyReqOpts, originalReq) {
    proxyReqOpts.rejectUnauthorized = false
    return proxyReqOpts;
  }
}))

proxyReqOpts is defined by import { RequestOptions } from "http";
Which does not have a rejectUnauthorized option.
That option actually exists in: import { RequestOptions } from "https"

@huineng
Copy link

huineng commented Jan 18, 2022

(proxyReqOpts as any).rejectUnauthorized = false;

@matsko
Copy link

matsko commented Oct 12, 2022

Can this be fixed? This is really misleading when following the instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants