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.

Accept HTTP_PROXY to specify a fallback server during development

See original GitHub issue

Like proxy in package.json could react-script start also accept the HTTP_PROXY or HTTPS_PROXY environment variables to specify a fallback server during development?

It would be as easy as adding a few lines of code

var proxy = require(paths.appPackageJson).proxy
if (!proxy) {
  proxy = process.env.HTTPS ? process.env.HTTPS_PROXY : process.env.HTTP_PROXY

This is useful in situations like mine where some team members don’t use dockers and others do, resulting in different proxy urls.

I’m available to create a PR if you deem this acceptable.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:20
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

GameKyuubicommented, Sep 13, 2017

I am shocked and appalled that HTTPS_PROXY isn’t honored by react-scripts 👎

gaearoncommented, Jan 8, 2018

I feel like our proxy setup is already pretty complicated and don’t want to complicate it further. IMO the workaround in is reasonable, and I suggest using that approach.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Proxying API Requests in Development - Create React App
The development server will only attempt to send requests without text/html in its Accept header to the proxy. Conveniently, this avoids CORS ...
Read more >
HTTP fallback configuration, testing and troubleshooting - IBM
The web server (Apache) must be configured as a proxy to proxy the requests that Connect client initiate. a. Configure the Apache SSL...
Read more >
nginx reverse proxy with fallback - Server Fault
I need to do a 2TB S3 migration and it would simplify the process if nginx could be setup this way. Here is...
Read more >
DevServer - webpack
See the development guide to get started. ... This set of options is picked up by webpack-dev-server and can be used to change...
Read more >
React — How To Proxy To Backend Server - Medium
Setting up proxying into the backend server with Create React App is straight forward and easy. To tell the development server to proxy...
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