Documentation
¶
Index ¶
- Constants
- Variables
- func CORSMiddleware(methods ...string) http.HandlerFunc
- func Recover(next http.Handler) http.Handler
- func RecoverFiber(next fiber.Handler) fiber.Handler
- func Telemetry() func(next fiber.Handler) fiber.Handler
- func Timing(next fiber.Handler) fiber.Handler
- func URLWithoutQuery(r *http.Request) string
Constants ¶
View Source
const HeaderXTraceID = "X-Trace-ID"
Variables ¶
View Source
var ( DefaultSpanNameFormatter = func(_ string, r *http.Request) string { var b strings.Builder b.WriteString(r.Method) b.WriteString(":") b.WriteString(decreasePathCardinality(r.URL.Path)) return b.String() } DefaultFilter = func(r *http.Request) bool { if k, ok := r.Header["Upgrade"]; ok { for _, v := range k { if v == "websocket" { return false } } } return r.Method != http.MethodGet || !strings.HasPrefix(r.URL.RequestURI(), "/health") } )
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware(methods ...string) http.HandlerFunc
CORSMiddleware implement cors request
func RecoverFiber ¶
func RecoverFiber(next fiber.Handler) fiber.Handler
func URLWithoutQuery ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.