Documentation
¶
Index ¶
- Constants
- func LoadI18n(fs fs.FS)
- func ParseCaddyFileApp(d *caddyfile.Dispenser, _ any) (any, error)
- func ParseCaddyFileEndpoint(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
- func ParseCaddyFileMiddleware(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
- type App
- type Endpoint
- type Middleware
- func (Middleware) CaddyModule() caddy.ModuleInfo
- func (m *Middleware) Provision(ctx caddy.Context) error
- func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
- func (m *Middleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- func (m *Middleware) Validate() error
Constants ¶
View Source
const ( IV1 = "/L4y6KgWa8vHEujU3O6JyI8osQxwh1nE0Eoay4nD3vw/y36eSFT0s/GTGfrngN6+" IV2 = "KHo5hHR3ZfisR7xeG1gJwO3LSc1cYyDUQ5+StoAjV8jLhp01NBNi4joHYTWXDqF0" )
Variables ¶
This section is empty.
Functions ¶
func ParseCaddyFileEndpoint ¶
func ParseCaddyFileEndpoint(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
func ParseCaddyFileMiddleware ¶
func ParseCaddyFileMiddleware(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
Types ¶
type App ¶
App is the global configuration for cerberus. There can only be one cerberus app in the entire Caddy runtime.
func (App) CaddyModule ¶
func (App) CaddyModule() caddy.ModuleInfo
func (*App) GetInstance ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint is the handler that will be used to serve challenge endpoints and static files.
func (Endpoint) CaddyModule ¶
func (Endpoint) CaddyModule() caddy.ModuleInfo
type Middleware ¶
type Middleware struct {
// The base URL for the challenge. It must be the same as the deployed endpoint route.
BaseURL string `json:"base_url,omitempty"`
// If true, the middleware will not perform any challenge. It will only block known bad IPs.
BlockOnly bool `json:"block_only,omitempty"`
// contains filtered or unexported fields
}
Middleware is the actual middleware that will be used to challenge requests.
func (Middleware) CaddyModule ¶
func (Middleware) CaddyModule() caddy.ModuleInfo
func (*Middleware) ServeHTTP ¶
func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
func (*Middleware) UnmarshalCaddyfile ¶
func (m *Middleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
func (*Middleware) Validate ¶
func (m *Middleware) Validate() error
Click to show internal directories.
Click to hide internal directories.