Skip to content

Commit

Permalink
Match trailing slash at end of wss url
Browse files Browse the repository at this point in the history
  • Loading branch information
lnfel committed Aug 4, 2023
1 parent a2d42f0 commit 19a9a47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/websocket/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const wsClients = new Map()
export const onHttpServerUpgrade = (request, sock, head) => {
const pathname = request.url ? parse(request.url).pathname : null
console.log('onHttpServerUpgrade pathname: ', pathname)
if (pathname !== '/websocket') return
if (pathname !== '/websocket/') return

/**
* @type {import('ws').Server<import('ws').WebSocket>}
Expand Down

0 comments on commit 19a9a47

Please sign in to comment.