docs: update proxy examples to remove unnecessary path segments#7140
docs: update proxy examples to remove unnecessary path segments#7140chenjiahan merged 6 commits intomainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary of ChangesHello @chenjiahan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an inaccuracy in the proxy configuration examples and documentation, which stemmed from a misunderstanding of Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Deploying rsbuild with
|
| Latest commit: |
c19a387
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://15d1d24b.rsbuild-v2.pages.dev |
| Branch Preview URL: | https://proxy-example-0204.rsbuild-v2.pages.dev |
There was a problem hiding this comment.
Code Review
This pull request correctly updates the proxy examples across the documentation (both English and Chinese) and e2e tests to align with the behavior of http-proxy-middleware v3. The removal of unnecessary path segments from the target URLs is a good fix that resolves the misunderstanding mentioned in the description. I've added one suggestion to improve consistency in the test file's proxy configuration.
There was a problem hiding this comment.
Pull request overview
Updates Rsbuild documentation and tests to correct proxy configuration examples by removing unnecessary path segments in target URLs (aligning with http-proxy-middleware v3 behavior).
Changes:
- Fix proxy
targetexamples to avoid duplicating path segments (e.g.,/api/api/...,/foo/foo/...). - Adjust upgrade guides (EN/ZH) to remove the incorrect migration note about needing to include the proxied path in
target. - Update an e2e proxy test to reflect the corrected proxy
targetbehavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/guide/upgrade/v1-to-v2.mdx | Removes the incorrect target-path guidance and keeps the remaining v2→v3 proxy option migration notes. |
| website/docs/zh/config/server/proxy.mdx | Fixes proxy examples by removing unnecessary path segments from target URLs. |
| website/docs/en/guide/upgrade/v1-to-v2.mdx | Mirrors the ZH upgrade guide adjustments for proxy middleware migration notes. |
| website/docs/en/config/server/proxy.mdx | Updates some proxy examples (local/ws/bypass), but still has an inconsistent “Basic usage” example needing correction. |
| e2e/cases/server/proxy-mixed-rules/index.test.ts | Updates proxy test targets to avoid path duplication when forwarding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Update proxy examples to remove unnecessary path segments. Because I misunderstood the section on “Removed req.url patching” in https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-requrl-patching, I ended up writing an incorrect example.
Checklist