Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cidrs ¶
Cidrs is a slice of IPNet addresses
func ParseCIDRs ¶
ParseCIDRs parse IPNet addresses and return slice of its
type FCGI ¶
type FCGI struct { // Address and port to handle as http server. Address string }
FCGI for FastCGI server.
type HTTP ¶
type HTTP struct { // Host and port to handle as http server. Address string // SSLConfig defines https server options. SSLConfig *SSL `mapstructure:"ssl"` // FCGIConfig configuration. You can use FastCGI without HTTP server. FCGIConfig *FCGI `mapstructure:"fcgi"` // HTTP2Config configuration HTTP2Config *HTTP2 `mapstructure:"http2"` // MaxRequestSize specified max size for payload body in megabytes, set 0 to unlimited. MaxRequestSize uint64 `mapstructure:"max_request_size"` // TrustedSubnets declare IP subnets which are allowed to set ip using X-Real-Ip and X-Forwarded-For TrustedSubnets []string `mapstructure:"trusted_subnets"` // Uploads configures uploads configuration. Uploads *Uploads `mapstructure:"uploads"` // Pool configures worker pool. Pool *poolImpl.Config `mapstructure:"pool"` // Env is environment variables passed to the http pool Env map[string]string // List of the middleware names (order will be preserved) Middleware []string // slice of net.IPNet Cidrs Cidrs }
HTTP configures RoadRunner HTTP server.
func (*HTTP) EnableFCGI ¶
EnableFCGI is true when FastCGI server must be enabled.
func (*HTTP) EnableHTTP ¶
EnableHTTP is true when http server must run.
func (*HTTP) InitDefaults ¶
InitDefaults must populate HTTP values using given HTTP source. Must return error if HTTP is not valid.
type HTTP2 ¶
type HTTP2 struct { // H2C enables HTTP/2 over TCP H2C bool // MaxConcurrentStreams defaults to 128. MaxConcurrentStreams uint32 `mapstructure:"max_concurrent_streams"` }
HTTP2 HTTP/2 server customizations.
func (*HTTP2) InitDefaults ¶
InitDefaults sets default values for HTTP/2 configuration.
type SSL ¶
type SSL struct { // Address to listen as HTTPS server, defaults to 0.0.0.0:443. Address string // Redirect when enabled forces all http connections to switch to https. Redirect bool // Key defined private server key. Key string // Cert is https certificate. Cert string // Root CA file RootCA string `mapstructure:"root_ca"` Port int // contains filtered or unexported fields }
SSL defines https server configuration.
type Uploads ¶
type Uploads struct { // Dir contains name of directory to control access to. Dir string // Forbid specifies list of file extensions which are forbidden for access. // Example: .php, .exe, .bat, .htaccess and etc. Forbid []string }
Uploads describes file location and controls access to them.
func (*Uploads) InitDefaults ¶
InitDefaults sets missing values to their default values.
Click to show internal directories.
Click to hide internal directories.