Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket can not connect when using https fastify #109

Closed
2 tasks done
benatshippabo opened this issue May 6, 2023 · 0 comments · Fixed by #110
Closed
2 tasks done

Websocket can not connect when using https fastify #109

benatshippabo opened this issue May 6, 2023 · 0 comments · Fixed by #110

Comments

@benatshippabo
Copy link
Contributor

benatshippabo commented May 6, 2023

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

^4.17.0

Plugin version

^4.0.0

Node.js version

v18.16.0

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

13.3.1 (22E261)

Description

App served via the @fastify/vite plugin does not work when configuring fastify to use https and http2

Steps to Reproduce

Reproduction repository: https://github.com/benatshippabo/fastify-vite-test

git clone https://github.com/benatshippabo/fastify-vite-test.git
cd fastify-vite-test
yarn
yarn ts-node devserver.ts
  • go to https://localhost:3000
  • check console for errors about not being able to connect to wss://localhost:24678/
  • try to edit ./src/App.tsx
  • notice hmr does not work

Expected Behavior

Going to https://localhost:3000 and editing ./src/App.tsx hot reloads properly with no errors about connectivity issues to the websocket.

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 a pull request may close this issue.

1 participant