Restrict dev MCP server to loopback hosts#93900
Open
2830500285 wants to merge 3 commits into
Open
Conversation
Kelleretoro
approved these changes
May 18, 2026
Kelleretoro
approved these changes
May 18, 2026
Kelleretoro
approved these changes
May 18, 2026
640ceb6 to
9e2911d
Compare
Author
|
Thanks for reviewing this PR. I have updated the branch and all commits are now verified. The completed checks are green; the remaining blockers appear to be maintainer approval for the pending workflows and a write-access review. Could a maintainer please approve the pending workflows and take another look when possible? I would appreciate getting this merged if everything looks good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
localhost,127.0.0.1,[::1]) on the active dev-server port0.0.0.0Test Plan
git diff --check -- packages/next/src/server/mcp/get-mcp-middleware.ts packages/next/src/server/mcp/get-mcp-middleware.test.tsnext@16.3.0-canary.21app started vianext dev -H 0.0.0.0 -p 3100:http://127.0.0.1:3100/_next/mcpstill returns HTTP 200http://192.168.188.88:3100/_next/mcpreturns HTTP 403Invalid Host headerNote: this sparse checkout does not have
node_modulesinstalled, so the Jest test could not be run locally here.