Documentation ¶
Overview ¶
Package cookieflag provides a Caddy module that modifies various flags (Secure, HttpOnly, ...) in Set-Cookie headers. It allows users to customize these flags based on their needs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CookieFlag ¶
type CookieFlag struct { // The list of cookie flags to be modified. // // Prepend the flag name with a `+` to add that flag or with `-` to remove it // // Flag | Description // ------------|------------- // secure | The `Secure` flag // httponly | The `HttpOnly` flag Flags []string `json:"flags,omitempty"` }
CookieFlag manipulate various flags (Secure, HttpOnly, ...) in the Set-Cookie reponse headers.
Syntax:
cookieflag [<matcher>] [(+|-)<field>] { +<field> -<field> }
func (CookieFlag) CaddyModule ¶
func (CookieFlag) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (CookieFlag) ServeHTTP ¶
func (cf CookieFlag) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
ServeHTTP implements caddyhttp.MiddlewareHandler.
func (*CookieFlag) UnmarshalCaddyfile ¶
func (cf *CookieFlag) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile sets up the handler from Caddyfile tokens.
Click to show internal directories.
Click to hide internal directories.