// Package middleware provides Huma middleware for the MusicServer API. package middleware import ( "github.com/danielgtaylor/huma/v2" "github.com/danielgtaylor/huma/v2/adapters/humaecho" ) // Middleware is a Huma middleware function. type Middleware = func(ctx huma.Context, next func(huma.Context)) // clientIP returns the client IP as resolved by Echo (respecting trusted proxies). func clientIP(ctx huma.Context) string { return humaecho.Unwrap(ctx).RealIP() }