Skip to content

fix: add WebSocket host permissions - #371

Merged
sylingd merged 1 commit into
FirefoxBar:devfrom
gongsir0630:codex/fix-websocket-host-permissions
Sep 24, 2026
Merged

sylingd merged 1 commit into
FirefoxBar:devfrom
gongsir0630:codex/fix-websocket-host-permissions

Conversation

@gongsir0630

@gongsir0630 gongsir0630 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

ALL_RESOURCE_TYPES already includes websocket, but the generated manifests only request *://*/*. Chrome does not grant that pattern access to ws:// and wss:// origins, so request-header rules do not run on WebSocket upgrade requests.

This adds explicit ws://*/* and wss://*/* permissions to both MV2 and MV3 manifests.

Related: #180, #253

Tested:

  • pnpm run test:unit (69 passing)
  • built chrome_v2, chrome_v3, firefox_v2, and firefox_v3
  • loaded the Chrome MV3 build and verified a request-header rule on a wss:// handshake

The unpacked build works in Chrome. Chrome Web Store validation of explicit wss:// host permissions still needs confirmation in the release pipeline.

Summary by CodeRabbit

  • Bug Fixes
    • WebSocket connections using ws:// and wss:// are now covered by the relevant extension permissions when DNR or webRequest is enabled.

Allow request-header rules to match ws:// and wss:// handshakes.
@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4967fa80-9266-4cb1-b365-23023eb7e1fa

📥 Commits

Reviewing files that changed from the base of the PR and between ac8a69c and 7ef3384.

📒 Files selected for processing (1)
  • scripts/browser-config/get-manifest.js
 __________________________
< Grammarly for your code. >
 --------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sylingd
sylingd changed the base branch from master to dev September 24, 2026 08:42
@sylingd
sylingd merged commit e13682c into FirefoxBar:dev Sep 24, 2026
1 check was pending
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.

2 participants