Documentation
¶
Index ¶
- func AddEventMetadataToCtx(next http.Handler) http.Handler
- func AddOrgIDToCtx(orgStore store.Organization) func(http.Handler) http.Handler
- func CreateRouteExistsMiddleware(router chi.Router) func(http.Handler) http.Handler
- func GrpcAuthMiddleware(ctx context.Context) (context.Context, error)
- func InstallRateLimiter(r chi.Router, opts RateLimitOptions)
- func NewHTTPServer(router http.Handler, log logrus.FieldLogger, address string, ...) *http.Server
- func NewHTTPServerWithTLSContext(router http.Handler, log logrus.FieldLogger, address string, ...) *http.Server
- func NewTLSListener(address string, tlsConfig *tls.Config) (net.Listener, error)
- func RequestID(next http.Handler) http.Handler
- func RequestSizeLimiter(maxURLLength int, maxNumHeaders int) func(http.Handler) http.Handler
- func TrustedRealIP(trustedCIDRs []string) func(http.Handler) http.Handler
- func ValidateClientTlsCert(ctx context.Context) (context.Context, error)
- type RateLimitOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEventMetadataToCtx ¶ added in v0.7.0
func AddOrgIDToCtx ¶ added in v0.9.0
func CreateRouteExistsMiddleware ¶ added in v0.6.0
func GrpcAuthMiddleware ¶
client has to present client TLS certificate
func InstallRateLimiter ¶ added in v0.9.0
func InstallRateLimiter(r chi.Router, opts RateLimitOptions)
InstallRateLimiter installs RealIP + custom rate limiter.
func NewHTTPServer ¶
func NewTLSListener ¶
NewTLSListener returns a new TLS listener. If the address is empty, it will listen on localhost's next available port.
func RequestSizeLimiter ¶ added in v0.4.0
RequestSizeLimiter returns a middleware that limits the URL length and the number of request headers.
func TrustedRealIP ¶ added in v0.9.0
TrustedRealIP only rewrites RemoteAddr when the immediate peer is in one of your LB CIDRs
Types ¶
Click to show internal directories.
Click to hide internal directories.