Skip to content

feat: add pathRewriteRule and pathRewriteTo options#73

Open
hagevvashi wants to merge 4 commits intotxchen:masterfrom
hagevvashi:master
Open

feat: add pathRewriteRule and pathRewriteTo options#73
hagevvashi wants to merge 4 commits intotxchen:masterfrom
hagevvashi:master

Conversation

@hagevvashi
Copy link
Copy Markdown

@hagevvashi hagevvashi commented Dec 3, 2020

This PR enables path-rewriting when proxying by using http-proxy-middleware.

as-is

we cannot proxy below pattern

from http://localhost:8000/api/todos/1 to http://localhost:8001/api/todos/1

to-be

we can proxy below pattern

from http://localhost:8000/api/todos/1 to http://localhost:8001/todos/1

Comment thread package.json
@@ -29,6 +29,7 @@
"connect-injector": "^0.4.4",
"gaze": "^1.1.3",
"http-proxy": "^1.18.1",
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could I remove this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants