package
0.0.0-20220415114507-23e4a566c725
Repository: https://github.com/majodev/go-beer-punk-proxy.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DefaultBodyLogReplacer returns the body received without any modifications.
DefaultHeaderLogReplacer replaces all Authorization, X-CSRF-Token and Proxy-Authorization header entries with a redacted string, indicating their presence without revealing actual, potentially sensitive values in the logs.
DefaultQueryLogReplacer returns the query received without any modifications.
DefaultRequestBodyLogSkipper returns true for all requests with Content-Type application/x-www-form-urlencoded or multipart/form-data as those might contain binary or URL-encoded file uploads unfit for logging purposes.
DefaultResponseBodyLogSkipper returns false for all responses with Content-Type application/json, preventing logging for all other types of payloads as those might contain binary or URL-encoded data unfit for logging purposes.
No description provided by the author
No description provided by the author
NoCache is a simple piece of middleware that sets a number of HTTP headers to prevent a router (or subrouter) from being cached by an upstream proxy and/or client.
NoCacheWithConfig returns a nocache middleware with config.
No description provided by the author

# Constants

AuthFailureModeNotFound returns a 404 Not Found response on missing or invalid authentication.
AuthFailureModeUnauthorized returns a 401 Unauthorized response on missing or invalid authentication.
AuthModeNone does not require an auth token to be present in order to access the route or group and will not attempt to parse any authentication provided.
AuthModeOptional does not require an auth token to be present, however if it is, it must be valid in order to access the route or group.
AuthModeRequired requires an auth token to be present and valid in order to access the route or group.
AuthModeSecure requires an auth token to be present and for the user to have recently re-confirmed their authentication in order to access the route or group.
AuthModeTry does not require an auth token to be present in order to access the route or group and will process the request even if an invalid one has been provided.
AuthTokenSourceForm retrieves the auth token from a form parameter, specified by TokenSourceKey.
AuthTokenSourceHeader retrieves the auth token from a header, specified by TokenSourceKey.
AuthTokenSourceQuery retrieves the auth token from a query parameter, specified by TokenSourceKey.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
DefaultNoCacheConfig is the default nocache middleware config.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
AuthMode controls the type of authentication check performed for a specific route or group.
No description provided by the author
No description provided by the author
No description provided by the author
BodyLogReplacer defines a function to replace certain parts of a body before logging it, mainly used to strip sensitive information from a request or response payload.
HeaderLogReplacer defines a function to replace certain parts of a header before logging it, mainly used to strip sensitive information from a request or response header.
QueryLogReplacer defines a function to replace certain parts of a URL query before logging it, mainly used to strip sensitive information from a request query.
RequestBodyLogSkipper defines a function to skip logging certain request bodies.
ResponseBodyLogSkipper defines a function to skip logging certain response bodies.