diff --git a/server/routes.go b/server/routes.go index 44ce5119..cdcd9a17 100644 --- a/server/routes.go +++ b/server/routes.go @@ -1043,6 +1043,11 @@ func allowedHostsMiddleware(addr net.Addr) gin.HandlerFunc { if addr, err := netip.ParseAddr(host); err == nil { if addr.IsLoopback() || addr.IsPrivate() || addr.IsUnspecified() || isLocalIP(addr) { + if c.Request.Method == http.MethodOptions { + c.AbortWithStatus(http.StatusNoContent) + return + } + c.Next() return }