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

fix the breaking change in http-proxy-middleware upgrade #223

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

marjisound
Copy link
Contributor

What does this change?

The version upgrade of http-proxy-middleware in this PR #222 was causing issues in local run and couldn't proxy the requests to the correct target. This is because of a breaking change in V3 as explained in https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-requrl-patching that When proxy is mounted on a path, this path should be provided in the target.

// before
app.use('/user', proxy({ target: 'http://www.example.org' }));

// after
app.use('/user', proxy({ target: 'http://www.example.org/user' }));

@marjisound marjisound requested a review from a team as a code owner July 5, 2024 11:23
@marjisound marjisound merged commit 04827b0 into main Jul 8, 2024
4 checks passed
@marjisound marjisound deleted the fix-beaking-change-of-http-proxy-middleware branch July 8, 2024 13:06
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