Skip to content

fix(core): resolve HMR WebSocket URLs from blob origins - #8709

Merged
chenjiahan merged 2 commits into
mainfrom
chenjiahan/fix-blob-websocket-url
Oct 22, 2026
Merged

chenjiahan merged 2 commits into
mainfrom
chenjiahan/fix-blob-websocket-url

Conversation

@chenjiahan

@chenjiahan chenjiahan commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Motivation

When the HMR client runs under a blob URL, its location has no hostname or port and uses the blob: protocol. Automatic WebSocket URL resolution can therefore fall back to ws://localhost instead of the server's address.

Related fix in rspack-dev-server: rstackjs/rspack-dev-server#267.

Changes

Resolve blob locations from their non-opaque origin before the existing WebSocket URL formatting logic runs. Keep explicit client settings and fallback handling unchanged, with four focused tests for HTTP and HTTPS blob URLs, regular URLs, and opaque origins.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T02:57:18.083193Z 8542a4c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chenjiahan
chenjiahan merged commit 061dc8f into main Oct 22, 2026
7 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/fix-blob-websocket-url branch October 22, 2026 03:07
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.

1 participant