Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidSplitPath = errors.New("split path contains non-ASCII characters")
)
Functions ¶
Types ¶
type Transport ¶
type Transport struct {
// Use this directory as the scgi root directory. Defaults to the root
// directory of the parent virtual host.
Root string `json:"root,omitempty"`
// The path in the URL will be split into two, with the first piece ending
// with the value of SplitPath. The first piece will be assumed as the
// actual resource (CGI script) name, and the second piece will be set to
// PATH_INFO for the CGI script to use.
//
// Split paths can only contain ASCII characters.
// Comparison is case-insensitive.
//
// Future enhancements should be careful to avoid CVE-2019-11043,
// which can be mitigated with use of a try_files-like behavior
// that 404s if the scgi path info is not found.
SplitPath []string `json:"split_path,omitempty"`
// Path declared as root directory will be resolved to its absolute value
// after the evaluation of any symbolic links.
ResolveRootSymlink bool `json:"resolve_root_symlink,omitempty"`
// Extra environment variables.
EnvVars map[string]string `json:"env,omitempty"`
// The duration used to set a deadline when connecting to an upstream. Default: `3s`.
DialTimeout caddy.Duration `json:"dial_timeout,omitempty"`
// The duration used to set a deadline when reading from the SCGI server.
ReadTimeout caddy.Duration `json:"read_timeout,omitempty"`
// The duration used to set a deadline when sending to the SCGI server.
WriteTimeout caddy.Duration `json:"write_timeout,omitempty"`
// Capture and log any messages sent by the upstream on stderr. Logs at WARN
// level by default. If the response has a 4xx or 5xx status ERROR level will
// be used instead.
CaptureStderr bool `json:"capture_stderr,omitempty"`
// contains filtered or unexported fields
}
Transport facilitates SCGI communication.
func (Transport) CaddyModule ¶
func (Transport) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Transport) UnmarshalCaddyfile ¶
UnmarshalCaddyfile deserializes Caddyfile tokens into h.
transport scgi {
root <path>
split <at>
env <key> <value>
resolve_root_symlink
dial_timeout <duration>
read_timeout <duration>
write_timeout <duration>
capture_stderr
}
Click to show internal directories.
Click to hide internal directories.