package
1.3.3
Repository: https://github.com/randlabs/go-webserver.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
DefaultCORS creates a default CORS middleware that allows requests from anywhere.
DefaultSafeBrowsing creates a default SafeBrowsing middleware with commonly used options.
DisableClientCache creates a default cache control middleware that disables the client's cache.
NewCacheControl creates a new client cache control middleware based on the specified options.
NewConditional wraps a middleware to conditionally execute or skip it depending on the evaluator's return value.
NewCORS creates a new CORS middleware based on the specified options.
NewNoOP creates a no-operation middleware.
NewPanic wraps a middleware that recovers from panics.
NewProtected creates a protection middleware based on an evaluator callback.
NewSafeBrowsing creates a new SafeBrowsing middleware based on the specified options.
NewTrailingSlash creates a new middleware to handle trailing slashes in request's paths.
ProtectedWithToken creates a protection middleware based on an access token string.

# Structs

CacheControlOptions defines the behavior on how Cache-Control headers are sent.
CORSOptions defines the behavior on how CORS requests should be handled.
PanicOptions defines the behavior on how to deal with panics raised by request handlers.
SafeBrowsingOptions defines how common response headers for safe browsing are added.
TrailingSlashOptions defines a middleware that adds or removes trailing slashes in paths.

# Type aliases

ConditionEvaluator defines a function that executes the wrapped middleware if returns true.
PanicErrorHandler defines a function to call when a panic occurs.
ProtectedEndpointEvaluator evaluates if endpoint access must be denied.