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: server mounting [BREAKING CHANGE] #731

Merged
merged 1 commit into from Mar 20, 2022
Merged

fix: server mounting [BREAKING CHANGE] #731

merged 1 commit into from Mar 20, 2022

Conversation

chimurai
Copy link
Owner

@chimurai chimurai commented Mar 20, 2022

Description

Fixes incorrect usage of originalUrl. Introduced in #18

Now you can modify the baseUrl; a feature which Express' app.use already provides..

// mount on "/users" and keep the "/users" base path
app.use('/user', createProxyMiddleware({'target': 'https://jsonplaceholder.typicode.com/users'}))


// mount on "/users" and change the "/users" base path
app.use('/user', createProxyMiddleware({'target': 'https://jsonplaceholder.typicode.com/customers'}))

Motivation and Context

How has this been tested?

  • Unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@chimurai chimurai changed the base branch from master to v3 March 20, 2022 14:30
@coveralls
Copy link

coveralls commented Mar 20, 2022

Coverage Status

Coverage decreased (-0.007%) to 98.788% when pulling 91c5715 on fix-originalUrl into 8a2e7a6 on v3.

@chimurai chimurai added this to the v3.0.0 milestone Mar 20, 2022
@chimurai chimurai merged commit 9b46bb2 into v3 Mar 20, 2022
@chimurai chimurai deleted the fix-originalUrl branch March 20, 2022 15:08
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.

None yet

2 participants