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

Add user defined proxy via middleware #5073

Merged
merged 2 commits into from
Sep 24, 2018

Conversation

Timer
Copy link
Contributor

@Timer Timer commented Sep 24, 2018

Since the old advanced proxy wasn't very advanced, this adds support for a "user mode" proxy, where the user is free to define any middleware that will act as their proxy.

example usage:

// src/setupProxy.js
module.exports = function(app: express.Application) {
  // ...
};

@Timer
Copy link
Contributor Author

Timer commented Sep 24, 2018

Does anyone think this should be function(app) {} instead?
How about a better file name?

@Timer Timer merged commit 2ee4fa8 into facebook:next Sep 24, 2018
@Timer Timer deleted the feature/user-defined-proxy branch September 24, 2018 15:24
zmitry pushed a commit to zmitry/create-react-app that referenced this pull request Sep 30, 2018
* Add user defined proxy via middleware

* Pass app, instead
@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants