refactor: Remove unreachable dead code branches

- checkOrigin: Remove redundant same-origin check at line 155 that was
  already handled at line 116 (origin == requestOrigin)

Function improved from 95.1% to 97.4% coverage.
This commit is contained in:
rcourtman
2025-12-02 14:56:35 +00:00
parent fe77d44620
commit 80baf3ad95

View File

@@ -151,11 +151,7 @@ func (h *Hub) checkOrigin(r *http.Request) bool {
return true
}
// Still check for exact same-origin match
if origin == requestOrigin {
return true
}
// Note: same-origin match already handled above (line 116)
log.Warn().
Str("origin", origin).
Str("requestOrigin", requestOrigin).