Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeaderOp ¶ added in v0.0.3
type HeaderOp struct {
Op HeaderOpType `json:"op"`
Name string `json:"name"`
Value string `json:"value,omitempty"`
}
type HeaderOpType ¶ added in v0.0.3
type HeaderOpType string
const ( HeaderOpSet HeaderOpType = "set" HeaderOpAdd HeaderOpType = "add" HeaderOpDelete HeaderOpType = "delete" )
type Request ¶
type Request struct {
Method string `json:"method"`
Scheme string `json:"scheme,omitempty"`
Host string `json:"host,omitempty"`
Path string `json:"path"`
RawQuery string `json:"raw_query,omitempty"`
Protocol string `json:"protocol,omitempty"`
Headers map[string][]string `json:"headers"`
RemoteAddr string `json:"remote_addr,omitempty"`
ClientIP string `json:"client_ip,omitempty"`
TLS bool `json:"tls,omitempty"`
}
type RequestPatch ¶ added in v0.2.0
type RequestPatch struct {
Headers []HeaderOp `json:"headers,omitempty"`
Host *string `json:"host,omitempty"`
Path *string `json:"path,omitempty"`
Query *string `json:"query,omitempty"`
}
RequestPatch mutates the request before it continues down the chain; nil pointer fields leave the component unchanged.
func (RequestPatch) IsZero ¶ added in v0.2.0
func (p RequestPatch) IsZero() bool
Directories
¶
| Path | Synopsis |
|---|---|
|
abi
|
|
|
adapters
|
|
|
cmd
|
|
|
switchboard
command
|
|
|
e2e
|
|
|
rules/v1
command
|
|
|
rules/v2
command
|
|
|
examples
|
|
|
ab-canary-routing
Package abcanaryrouting deterministically routes a fixed slice of users to a canary backend.
|
Package abcanaryrouting deterministically routes a fixed slice of users to a canary backend. |
|
admin-gate
Package admingate protects /admin/* behind a role cookie.
|
Package admingate protects /admin/* behind a role cookie. |
|
basic
command
|
|
|
chained
command
|
|
|
feature-flags
Package featureflags drives request policy from a typed config file bundled with the rule.
|
Package featureflags drives request policy from a typed config file bundled with the rule. |
|
ip-allowlist
Package ipallowlist denies any request whose client IP is not in an allowlist bundled with the rule.
|
Package ipallowlist denies any request whose client IP is not in an allowlist bundled with the rule. |
|
legacy-redirects
Package legacyredirects permanently redirects retired URLs to their modern replacements so old links, bookmarks, and search results keep working after a site restructure.
|
Package legacyredirects permanently redirects retired URLs to their modern replacements so old links, bookmarks, and search results keep working after a site restructure. |
|
maintenance-mode
Package maintenancemode short-circuits requests with a static 503 page while the origin is being worked on.
|
Package maintenancemode short-circuits requests with a static 503 page while the origin is being worked on. |
|
security-headers
Package securityheaders stamps baseline security headers onto every response: clickjacking protection, MIME-sniffing protection, a strict referrer policy, and HSTS on TLS connections.
|
Package securityheaders stamps baseline security headers onto every response: clickjacking protection, MIME-sniffing protection, a strict referrer policy, and HSTS on TLS connections. |
|
internal
|
|
|
bundlecache
Package bundlecache persists the last activated bundle per channel so a proxy can bootstrap after restart without reaching the registry.
|
Package bundlecache persists the last activated bundle per channel so a proxy can bootstrap after restart without reaching the registry. |
|
replay
Package replay runs captured Caddy access logs through two rule bundles and reports how their decisions differ.
|
Package replay runs captured Caddy access logs through two rule bundles and reports how their decisions differ. |
|
ruletest
Package ruletest parses and runs declarative behavioral test suites against a compiled rule; the CLI and the engine's activation gate share it.
|
Package ruletest parses and runs declarative behavioral test suites against a compiled rule; the CLI and the engine's activation gate share it. |
Click to show internal directories.
Click to hide internal directories.
