zitadel/internal/api/http/middleware/call_interceptor.go
Silvan e38abdcdf3
perf: query data AS OF SYSTEM TIME (#5231)
Queries the data in the storage layser at the timestamp when the call hit the API layer
2023-02-27 22:36:43 +01:00

14 lines
298 B
Go

package middleware
import (
"net/http"
"github.com/zitadel/zitadel/internal/api/call"
)
func CallDurationHandler(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
next.ServeHTTP(w, r.WithContext(call.WithTimestamp(r.Context())))
})
}