1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/middlewares/sentry.go
2021-03-23 22:12:15 +01:00

15 lines
282 B
Go

package middlewares
import (
sentryhttp "github.com/getsentry/sentry-go/http"
"net/http"
)
func NewSentryMiddleware() func(http.Handler) http.Handler {
return func(h http.Handler) http.Handler {
return sentryhttp.New(sentryhttp.Options{
Repanic: true,
}).Handle(h)
}
}