Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for redirection to corporate proxy

See original GitHub issue


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: '',
    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

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

gstroupcommented, Nov 10, 2015

Spent half the day fighting with my corporate proxy, until I found this. Thank you! Works perfectly.

chimuraicommented, Nov 10, 2015

Glad to hear this thread helped you out.

I’ve added a corporate proxy configuration example to the recipes:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reverse Proxy and HTTP Redirects - Apache Traffic Server
As a reverse proxy cache, Traffic Server serves requests on behalf of origin servers. Traffic Server is configured in such a way that...
Read more >
Redirect request to corporate proxy server with nginx reverse ...
I have a Gentoo linux where I run an application that makes requests to a certain domain, but does not respect my proxy...
Read more >
Add a Proxy Server to Redirect Traffic - Skyhigh Security
In Skyhigh CASB, click the Settings icon. · Select Infrastructure | Client Proxy Management. · In the policy tree, select Proxy Servers. ·...
Read more >
Configuring the Redirect Server to Support HTTP Proxies ...
Support for proxy requests is an optional feature of the redirect server. If you configure proxy support, you must also have DNS configured....
Read more >
Configure reverse proxy redirection | Cache Redirection
Navigate to Traffic Management > Cache Redirection > Map Policies. · In the details pane, click Add. · In the Create Map Policy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found