|
|
@@ -43,12 +43,12 @@ var upgrader = &websocket.Upgrader{
|
|
|
func (h *requestHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
|
|
|
var earlyData io.Reader
|
|
|
if !h.earlyDataEnabled { // nolint: gocritic
|
|
|
- if request.URL.Path != h.path {
|
|
|
+ if !strings.HasPrefix(request.URL.Path, h.path) {
|
|
|
writer.WriteHeader(http.StatusNotFound)
|
|
|
return
|
|
|
}
|
|
|
} else if h.earlyDataHeaderName != "" {
|
|
|
- if request.URL.Path != h.path {
|
|
|
+ if strings.HasPrefix(request.URL.Path, h.path) {
|
|
|
writer.WriteHeader(http.StatusNotFound)
|
|
|
return
|
|
|
}
|