Versions in this module Expand all Collapse all v0 v0.2.0 Nov 25, 2026 Changes in this version + const BodyReadTimeout + func BodyDeadline(w http.ResponseWriter, d time.Duration) (lift func()) + func LoopbackPeers() []netip.Prefix + func MountClean(next http.Handler) http.Handler v0.1.0 Nov 24, 2026 Changes in this version + const CodeConflict + const CodeForbidden + const CodeInternal + const CodeInvalid + const CodeInvalidToken + const CodeNoSession + const CodeNotFound + const CodeOtherBrowser + const CodeRateLimited + const CodeStepUp + const CodeUnauthorized + const CodeUpstream + const DefaultCSP + const HSTSValue + const HealthPath + const IdleTimeout + const MaxBody + const MaxHeaderBytes + const ReadHeaderTimeout + const ShutdownGrace + func BodyLimit(limit int64) func(http.Handler) http.Handler + func Chain(h http.Handler, mws ...func(http.Handler) http.Handler) http.Handler + func Healthz(w http.ResponseWriter, _ *http.Request) + func New(o Options) (http.Handler, error) + func NoStore(next http.Handler) http.Handler + func NotFound(w http.ResponseWriter, _ *http.Request) + func PeerGuard(o PeerOptions) func(http.Handler) http.Handler + func Recover(log *slog.Logger) func(http.Handler) http.Handler + func RequestLog(log *slog.Logger, mode core.ClientIPMode) func(http.Handler) http.Handler + func SecurityHeaders(csp string) func(http.Handler) http.Handler + func SetNoStore(w http.ResponseWriter) + func SetSecurityHeaders(h http.Header, csp string, coop bool) + func WriteError(w http.ResponseWriter, status int, code, message string) + type ErrorBody struct + Error string + Message string + type Options struct + Logger *slog.Logger + MaxBody int64 + Refused []netip.Prefix + RefusedMessage string + Routes []core.RouteRegistrar + Site core.Site + Trusted []netip.Prefix + type PeerOptions struct + Refused []netip.Prefix + RefusedMessage string + Trusted []netip.Prefix + type Server struct + func NewServer(o ServerOptions) (*Server, error) + func (s *Server) Addr() net.Addr + func (s *Server) Start(ctx context.Context) error + func (s *Server) Stop(ctx context.Context) error + type ServerOptions struct + Handler http.Handler + Listen string + Logger *slog.Logger