Skip to content

fix(isometric): use credentialless COEP to unblock local WebSocket#8218

Merged
h0lybyte merged 1 commit intodevfrom
trunk/isometric-coep-fix-1773800456
Mar 18, 2026
Merged

fix(isometric): use credentialless COEP to unblock local WebSocket#8218
h0lybyte merged 1 commit intodevfrom
trunk/isometric-coep-fix-1773800456

Conversation

@h0lybyte
Copy link
Member

Summary

  • Changed Cross-Origin-Embedder-Policy from require-corp to credentialless in the Vite dev server config
  • require-corp blocked WebSocket connections to the Lightyear game server (ws://127.0.0.1:5000) from the dev page (http://localhost:1420) because the game server doesn't send CORP headers
  • credentialless still enables crossOriginIsolated (SharedArrayBuffer / WASM threads) while allowing cross-origin requests — matches the production Axum middleware

Test plan

  • Run isometric:quick and verify the Vite dev server starts on port 1420
  • Confirm self.crossOriginIsolated === true in the browser console (SharedArrayBuffer still works)
  • Click "Go Online" and verify WebSocket connects to the local game server

The dev server's require-corp COEP policy blocked the WebSocket
connection to the Lightyear game server on a different port.
Switching to credentialless matches production and still enables
crossOriginIsolated for SharedArrayBuffer/WASM threads.
@github-actions
Copy link
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@h0lybyte h0lybyte merged commit f7ef6e6 into dev Mar 18, 2026
5 checks passed
@h0lybyte h0lybyte deleted the trunk/isometric-coep-fix-1773800456 branch March 18, 2026 02:34
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