Documentation ¶
Overview ¶
Package authproxy is a simple reverse proxy for Apple MDM clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(dest string, opts ...Option) (*httputil.ReverseProxy, error)
New creates a new NanoMDM enrollment authenticating reverse proxy. This reverse proxy is mostly the standard httputil proxy. It depends on middleware HTTP handlers to enforce authentication and set the context value for the enrollment ID.
Types ¶
type HeaderFunc ¶
HeaderFunc takes an HTTP request and returns a string value. Ostensibly to be set in a header on the proxy target.
type Option ¶
type Option func(*config)
func WithForwardMDMSignature ¶
func WithForwardMDMSignature() Option
WithForwardMDMSignature forwards the MDM-Signature header onto the proxy destination. This option is off by default because the header adds about two kilobytes to the request.
func WithHeaderFunc ¶
func WithHeaderFunc(header string, fn HeaderFunc) Option
WithHeaderFunc configures fn to be called and added as an HTTP header to the proxy target request.
func WithLogger ¶
WithLogger sets a logger for error reporting.