It's not working with WSS
gorcer opened this issue · 0 comments
gorcer commented
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.5.3
Plugin version
4.3.0
Node.js version
v16.16.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22.04
Description
When I try to connect to websocket via wss, I get a 404 error. The ws works fine.
Steps to Reproduce
My fastify routing:
module.exports = {
method: 'GET',
url: '/ws',
exposeHeadRoute: false,
websocket: true,
handler: async function (connection , req) {
......
})
}
Expected Behavior
ws://mysite.com/api/ws -works fine
wss://mysite.com/api/ws - returns 404 error
Please help.