Skip to content

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
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.

3 participants