Update proxy setup example for v3.0.0 in documentation #13560
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
followed by new Version 3.0.0 breaking changes change sample code and description
Summary
This PR updates the proxy setup example in the Create React App documentation to align with the breaking changes introduced in
http-proxy-middleware
version 3.0.0. Specifically, it addresses the requirement that the proxy target path must explicitly include the path it is mounted on.Background
As of
http-proxy-middleware
v3.0.0, the library has removed thereq.url
patching feature. This change requires that when a proxy is mounted on a specific path, this path must be explicitly included in the target URL. This update ensures that developers who follow the CRA documentation will implement proxying correctly according to the latest version ofhttp-proxy-middleware
.Changes
target
property.target
property forhttp-proxy-middleware
v3.0.0 and above.Updated Example