Skip to content

Conversation

@v1rtl
Copy link
Member

@v1rtl v1rtl commented Feb 1, 2026

Change API from middleware pattern to setup function to fix WebSocket connections timing out on HTTPS servers. The middleware pattern couldn't access the upgrade head buffer, causing Node.js to not properly recognize WebSocket upgrades.

BREAKING CHANGE: API changed from app.use(tinyws()) to tinyws(app, server)

  • Add paths option to restrict WebSocket handling to specific routes
  • Export TinyWSOptions interface for TypeScript users
  • Update examples and documentation

v1rtl and others added 2 commits February 1, 2026 09:54
Change API from middleware pattern to setup function to fix WebSocket
connections timing out on HTTPS servers. The middleware pattern couldn't
access the upgrade head buffer, causing Node.js to not properly recognize
WebSocket upgrades.

BREAKING CHANGE: API changed from `app.use(tinyws())` to `tinyws(app, server)`

- Add paths option to restrict WebSocket handling to specific routes
- Export TinyWSOptions interface for TypeScript users
- Update examples and documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix YAML indentation bug in main.yml
- Run CI on all pushes/PRs, not just master
- Add lint step to CI
- Update package.json scripts to use biome and bun test
- Add release.yml for npm publishing on git tags

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@v1rtl v1rtl force-pushed the fix/websocket-upgrade-head-buffer branch 2 times, most recently from 2c20e0d to d04439a Compare February 1, 2026 08:01
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@v1rtl v1rtl force-pushed the fix/websocket-upgrade-head-buffer branch from d04439a to 85d29b8 Compare February 1, 2026 08:01
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@v1rtl v1rtl force-pushed the fix/websocket-upgrade-head-buffer branch from 4dd5ffb to 6bee045 Compare February 1, 2026 08:04
@v1rtl v1rtl merged commit f25af65 into master Feb 1, 2026
4 of 5 checks passed
@v1rtl v1rtl deleted the fix/websocket-upgrade-head-buffer branch February 1, 2026 08:04
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