-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
feat(proxy): add server.proxy.router like vue-cli/http-proxy-middleware #2808
base: main
Are you sure you want to change the base?
Conversation
I really need this feature. When will it be finished? Or what can I do about it? |
I also need it. But I don't kow why this PR hasn't be merge for about fhree montshs. |
} | ||
} | ||
if (opts.rewrite) { | ||
req.url = opts.rewrite(req.url!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Why is it safe to use non-null assertion here?
Or could we just add the req.url
to the if condition and benefit from source flow analysis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the same code with the main branch's code. I just move it to another line.
const url = req.url! |
If req.url are null, the proxy won't run and the process will go into next middleware. Running in dev-server's proxy, I think it's just fine.
Can we get this merged? I'd also like this feature 🙏🏻 |
I am impatiently waiting for this new feature. I hope it will be soon 🙏🏻 |
Anything new here? Would be awesome if it could be reviewed @patak-dev |
It would be very nice to have this feature! |
is there any other methods to make this work before the PR merged ? |
Any updates on this PR, or any plans to support dynamic target? It's been 3 years. |
Description
router
api, because it use http-proxy-middleware to proxy dev request.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).