Documentation
¶
Overview ¶
Package middlewares provides HTTP middleware for the Gate server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChiRouteLabeler ¶ added in v1.0.4
ChiRouteLabeler attaches the matched chi route pattern as the "http.route" attribute on the active otelhttp span. It must run after otelhttp.NewMiddleware so the labeler is present in the request context.
func OriginVerify ¶
OriginVerify creates middleware that validates requests contain a shared secret header. Uses constant-time comparison to prevent timing attacks.
When origin verification is disabled via config, the middleware is a no-op. Returns 403 Forbidden when the header is missing or the value doesn't match.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.