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 StreamRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct { Include []string `json:"include"` Directives string `json:"directives"` // contains filtered or unexported fields }
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
Unmarshal Caddyfile implements caddyfile.Unmarshaler.
func (*Middleware) Validate ¶
func (m *Middleware) Validate() error
Validate implements caddy.Validator.
type StreamRecorder ¶
type StreamRecorder struct { *caddyhttp.ResponseWriterWrapper // contains filtered or unexported fields }
func NewStreamRecorder ¶
func NewStreamRecorder(w http.ResponseWriter, tx *coraza.Transaction) *StreamRecorder
func (*StreamRecorder) Buffered ¶
func (sr *StreamRecorder) Buffered() bool
Buffered returns true if the response is stored inside the transaction IF false the response was already sent to the client
func (*StreamRecorder) Reader ¶
func (sr *StreamRecorder) Reader() (io.Reader, error)
Reader provides access to the buffered/inmemory response object
func (*StreamRecorder) Status ¶
func (sr *StreamRecorder) Status() int
func (*StreamRecorder) WriteHeader ¶
func (sr *StreamRecorder) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.