Skip to content

Remove static-host header shim - #8

Merged
sputn1ck merged 1 commit into
mainfrom
kon/remove-static-host-header-shim
Jun 27, 2026
Merged

sputn1ck merged 1 commit into
mainfrom
kon/remove-static-host-header-shim

Conversation

@sputn1ck

@sputn1ck sputn1ck commented Jun 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • remove the GitHub Pages service-worker header shim (enable-threads.js)
  • update deployment docs so lightning.community/go-wasmsqlite is expected to provide real COOP/COEP/CORP headers
  • remove the browser test that expected the app to become isolated without server headers

Notes

If lightning.community/go-wasmsqlite/ serves real isolation headers, the service-worker shim is unnecessary and should be removed so missing headers fail visibly. The current same-location 301 loop happens before demo JavaScript loads, so it must be fixed at the route/origin layer.

Testing

  • go test ./...
  • make build-wasm
  • cd example && GOOS=js GOARCH=wasm go build -o main.wasm .
  • WASM_BROWSER_TEST=1 go test -run TestBrowserE2E ./...

Copilot AI review requested due to automatic review settings June 27, 2026 09:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the service-worker-based header shim previously used to “force” cross-origin isolation on static hosts, and updates CI/tests/docs to rely on the deployment environment providing real COOP/COEP/CORP headers.

Changes:

  • Removed enable-threads.js and its inclusion from the example page so missing isolation headers fail visibly.
  • Updated README deployment guidance to require host-provided isolation headers and clarified GitHub Pages limitations.
  • Removed the Netlify deploy job from CI and deleted the browser E2E test that validated the Pages-like shim behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Updates deployment/docs to remove the header-shim narrative and require real isolation headers from the hosting layer.
example/index.html Removes the script include for the service-worker header shim.
example/enable-threads.js Deletes the service worker used to inject COOP/COEP headers on static hosts.
browser_e2e_test.go Removes the Pages-like browser test that depended on the shim-induced isolation behavior.
.github/workflows/ci.yml Removes the Netlify production deploy job from CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines +387 to +388
The host in front of the built `./example` directory must set the OPFS headers
on every response:
@sputn1ck
sputn1ck force-pushed the kon/remove-static-host-header-shim branch from 2caabd6 to a13c250 Compare June 27, 2026 09:25
@sputn1ck
sputn1ck merged commit f72f300 into main Jun 27, 2026
3 checks passed
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