Documentation
¶
Index ¶
- Constants
- func IPAllowlist(allowedCIDRs []string, next http.Handler) (http.Handler, error)
- func JSONContentType(next http.Handler) http.Handler
- func Logger(next http.Handler) http.Handler
- func ProvisioningAuth(token string, next http.Handler) http.Handler
- func Recoverer(next http.Handler) http.Handler
Constants ¶
View Source
const HeaderProvisioningToken = "X-Moonhub-Provisioning-Token"
HeaderProvisioningToken is an alternate header for environments that strip Authorization.
Variables ¶
This section is empty.
Functions ¶
func IPAllowlist ¶
IPAllowlist restricts access to requests from configured CIDR ranges. Loopback addresses are always allowed for local administration. Empty CIDR list means no restriction.
func JSONContentType ¶
JSONContentType sets the Content-Type header to application/json for API requests handled by the wrapped handler. SSE endpoints (text/event-stream) are excluded.
func ProvisioningAuth ¶
ProvisioningAuth enforces a shared secret on /api/provisioning/* when token is non-empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.