PermissionByHTTP determines permission for a TLS certificate by making a request to an HTTP endpoint.
| 75 | // PermissionByHTTP determines permission for a TLS certificate by |
| 76 | // making a request to an HTTP endpoint. |
| 77 | type 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. |
| 95 | func (PermissionByHTTP) CaddyModule() caddy.ModuleInfo { |
nothing calls this directly
no outgoing calls
no test coverage detected