MCPcopy
hub / github.com/caddyserver/caddy / PermissionByHTTP

Struct PermissionByHTTP

modules/caddytls/ondemand.go:77–92  ·  view source on GitHub ↗

PermissionByHTTP determines permission for a TLS certificate by making a request to an HTTP endpoint.

Source from the content-addressed store, hash-verified

75// PermissionByHTTP determines permission for a TLS certificate by
76// making a request to an HTTP endpoint.
77type PermissionByHTTP struct {
78 // The endpoint to access. It should be a full URL.
79 // A query string parameter "domain" will be added to it,
80 // containing the domain (or IP) for the desired certificate,
81 // like so: `?domain=example.com`. Generally, this endpoint
82 // is not exposed publicly to avoid a minor information leak
83 // (which domains are serviced by your application).
84 //
85 // The endpoint must return a 200 OK status if a certificate
86 // is allowed; anything else will cause it to be denied.
87 // Redirects are not followed.
88 Endpoint string `json:"endpoint"`
89
90 logger *zap.Logger
91 replacer *caddy.Replacer
92}
93
94// CaddyModule returns the Caddy module information.
95func (PermissionByHTTP) CaddyModule() caddy.ModuleInfo {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected