Skip to content

Add support for redirection to corporate proxy #22

Closed
@sinedied

Description

@sinedied

Hello,

I'm working behind a corporate proxy, and I can't seem to make redirection work through it.

Here is my config:

{
  context: '/api',
  options: {
    pathRewrite: { '^/api' : '' },
    target: 'http://api.stuff.com',
    changeOrigin: true,
    toProxy: 'http://x.x.x.x:8080/'
  }

Maybe it's a misuse of the toProxy option, but I can't find a good example usage.

In another hand, it would be nice to make use of the standard http_proxy and https_proxy environment variables to make this work automatically without having to fiddle through the config (most node modules use these to work through corporate proxies).

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions