Notes from a 2 AM On-Call: Why Harper's WASM Module Silently Failed in Our Self-Hosted VSCode Server
Description and use
Adding worker‑src and script‑src CSP directives to Traefik/Nginx restored Harper extension functionality in a self‑hosted VSCode Server, fixing a silent Web Worker creation error.
Problem
Harper grammar checking stopped silently in a self-hosted VSCode Server after a reverse‑proxy CSP change.
Outcome
Adding worker‑src and script‑src CSP directives restored Harper functionality in a self‑hosted VSCode Server.
Workflow
- 1. Observe silent failure of Harper suggestions.
- 2. Verify extension activation, file associations, and language server process.
- 3. Check browser console for CSP errors – see "Refused to create a worker from 'blob:' (CSP violation)".
- 4. Update Traefik dynamic config to include worker‑src and script‑src directives.
- 5. Reload Traefik with SIGHUP and reload code‑server in browser.
- 6. Confirm "[Harper] WASM module loaded successfully" in console and suggestions appear.
- 7. Document CSP changes in runbook for future deployments.
Evidence
Refused to create a worker from 'blob:' (CSP violation)
worker-src 'self' blob:
script-src 'unsafe-eval'
- Record date: 2026-10-19T10:41:27.817Z