Documentation
¶
Index ¶
- type CaddyWAF
- func (CaddyWAF) CaddyModule() caddy.ModuleInfo
- func (m CaddyWAF) Cleanup() error
- func (m *CaddyWAF) Provision(ctx caddy.Context) error
- func (m CaddyWAF) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
- func (m *CaddyWAF) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaddyWAF ¶
type CaddyWAF struct {
WafEngineAddr string `json:"waf_engine_addr,omitempty"` // WAF Engine address
PoolSize int `json:"pool_size,omitempty"` // Pool size
// contains filtered or unexported fields
}
CaddyWAF implements an HTTP handler for WAF.
func (CaddyWAF) CaddyModule ¶
func (CaddyWAF) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (CaddyWAF) Cleanup ¶ added in v0.0.3
Cleanup releases resources associated with the CaddyWAF instance. It closes the WAF engine and logs the cleanup action. Returns an error if any issues occur during the cleanup process.
func (CaddyWAF) ServeHTTP ¶
ServeHTTP is the main handler for the CaddyWAF middleware. It processes incoming HTTP requests, uses the WAF engine to detect potential threats, and takes appropriate actions based on the detection results. If a threat is detected and blocked, it redirects the request to an intercept page. Otherwise, it passes the request to the next handler in the chain.