directives

package
v0.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 30 Imported by: 1

Documentation

Index

Constants

View Source
const (
	IV1 = "/L4y6KgWa8vHEujU3O6JyI8osQxwh1nE0Eoay4nD3vw/y36eSFT0s/GTGfrngN6+"
	IV2 = "KHo5hHR3ZfisR7xeG1gJwO3LSc1cYyDUQ5+StoAjV8jLhp01NBNi4joHYTWXDqF0"
)

Variables

This section is empty.

Functions

func LoadI18n added in v0.4.0

func LoadI18n(fs fs.FS)

func ParseCaddyFileApp

func ParseCaddyFileApp(d *caddyfile.Dispenser, _ any) (any, error)

Types

type App

type App struct {
	core.Config
	// contains filtered or unexported fields
}

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

func (c *App) GetInstance() *core.Instance

func (*App) Provision

func (c *App) Provision(context caddy.Context) error

func (*App) Start

func (c *App) Start() error

func (*App) Stop

func (c *App) Stop() error

func (*App) UnmarshalCaddyfile

func (c *App) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

func (*App) Validate

func (c *App) Validate() error

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

func (*Endpoint) Provision

func (e *Endpoint) Provision(ctx caddy.Context) error

func (*Endpoint) ServeHTTP

func (e *Endpoint) ServeHTTP(w http.ResponseWriter, r *http.Request, _ caddyhttp.Handler) error

func (*Endpoint) UnmarshalCaddyfile

func (e *Endpoint) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

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) Provision

func (m *Middleware) Provision(ctx caddy.Context) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL