Documentation
¶
Index ¶
- 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
- type Response
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
Key string
// contains filtered or unexported fields
}
Middleware implements an HTTP handler that inspects the current request.
func (Middleware) CaddyModule ¶
func (Middleware) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Middleware) Provision ¶
func (m *Middleware) Provision(ctx caddy.Context) error
Provision implements caddy.Provisioner.
func (Middleware) ServeHTTP ¶
func (m Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
ServeHTTP implements caddyhttp.MiddlewareHandler.
func (*Middleware) UnmarshalCaddyfile ¶
func (m *Middleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile implements caddyfile.Unmarshaler.
func (*Middleware) Validate ¶
func (m *Middleware) Validate() error
Validate implements caddy.Validator.
type Response ¶
type Response struct {
URL string `json:"url,omitempty"`
Method string `json:"method,omitempty"`
Host string `json:"host,omitempty"`
RequestHeaders http.Header `json:"request_headers,omitempty"`
ResponseHeaders http.Header `json:"response_headers,omitempty"`
RemoteAddress string `json:"remote_address,omitempty"`
Form string `json:"form,omitempty"`
Proto string `json:"proto,omitempty"`
UserAgent string `json:"user_agent,omitempty"`
Referer string `json:"referer,omitempty"`
ContentLength int64 `json:"content_length,omitempty"`
BasicAuth *struct {
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
} `json:"basic_auth,omitempty"`
Cookies []*http.Cookie `json:"cookies,omitempty"`
CaddyVersion string `json:"caddy_version,omitempty"`
CaddyContext struct {
Variables map[string]any `json:"Variables,omitempty"`
Modules []string `json:"Modules,omitempty"`
Error any `json:"Error,omitempty"`
} `json:"caddy_context,omitempty"`
CaddyModules []string `json:"caddy_modules,omitempty"`
Caddyfile *struct {
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
Source []string `json:"source,omitempty"`
SourceLineStart int `json:"source_line_start,omitempty"`
} `json:"caddyfile,omitempty"`
MemoryUsage string `json:"memory_usage,omitempty"`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.
