Documentation ¶
Index ¶
Constants ¶
View Source
const FirstHeaderKey string = "CONTENT_LENGTH"
SCGI requires content length as the first header
Variables ¶
View Source
var StatusRegex = regexp.MustCompile("(?i)(?:Status:|HTTP\\/[\\d\\.]+)\\s+(\\d{3}.*)")
StatusRegex describes the pattern for a raw HTTP Response code.
Functions ¶
This section is empty.
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. // // 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"` // 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> }
Click to show internal directories.
Click to hide internal directories.