Repository navigation
Conversation
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
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.
Why
A browser preview behind an HTTPS proxy sends its HTTPS Origin to the loopback broker. The broker needs an explicit origin setting to serve that preview.
What
Add the optional
browserOriginsetting torelayBrokerPlugin. It accepts one HTTPS origin from trusted server configuration. The setting is an explicit opt-in and requires the Vite server indevelopmentmode.How
The broker retains its loopback listener, loopback Host check, and same-origin request checks. The setting does not authenticate remote clients. The proxy must provide authentication. The default remains the HTTP loopback origin.
Risk
This affects the development broker only when the setting is present. Builds, production mode, and other modes reject the setting before identity access. An incorrect value prevents startup or blocks requests. Native and release hosts do not use it.
Testing
The regression checks exercise a real Vite loopback server with a disposable identity. They cover an accepted HTTPS request, an accepted POST, and refusal of other origins, cross-site requests, missing POST Origin, and a non-loopback Host. Vite config checks reject the option for production serve and development/production builds. The existing loopback checks also pass.
The author opens the hosted simulated preview on the laptop at
2419dcceand confirms it works. The later guard only rejects other configurations. The same development flow passes agent checks at18d9720e. Independent review covers that final revision and reports no findings.buzz-review-completed
Generated with Codex