@@ -1,3 +1,4 @@
+//go:build !confonly
// +build !confonly
package websocket
@@ -6,6 +7,7 @@ import (
"context"
"crypto/tls"
"net/http"
+ "strings"
"sync"
"time"
@@ -35,7 +37,7 @@ var upgrader = &websocket.Upgrader{
}
func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
- if request.URL.Path != h.path {
+ if !strings.HasPrefix(request.URL.Path, h.path) {
writer.WriteHeader(http.StatusNotFound)
return