Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// RawBody if turned on, RR will not parse the incoming HTTP body and will send it as is
RawBody bool `mapstructure:"raw_body"`
// Host and port to handle as http server.
Address string `mapstructure:"address"`
// AccessLogs turn on/off, logged at Info log level, default: false
AccessLogs bool `mapstructure:"access_logs"`
// List of the middleware names (order will be preserved)
Middleware []string `mapstructure:"middleware"`
// Pool configures worker pool.
Pool *pool.Config `mapstructure:"pool"`
// InternalErrorCode used to override default 500 (InternalServerError) http code
InternalErrorCode uint64 `mapstructure:"internal_error_code"`
// MaxRequestSize specified max size for payload body in megabytes, set 0 to unlimited.
MaxRequestSize uint64 `mapstructure:"max_request_size"`
// SSLConfig defines https server options.
SSLConfig *https.SSL `mapstructure:"ssl"`
// FCGIConfig configuration. You can use FastCGI without HTTP server.
FCGIConfig *fcgi.FCGI `mapstructure:"fcgi"`
// HTTP2Config configuration
HTTP2Config *https.HTTP2 `mapstructure:"http2"`
// Uploads configures uploads configuration.
Uploads *Uploads `mapstructure:"uploads"`
// private
UID int
GID int
}
Config configures RoadRunner HTTP server.
func (*Config) EnableFCGI ¶
EnableFCGI is true when FastCGI server must be enabled.
func (*Config) EnableHTTP ¶
EnableHTTP is true when http server must run.
func (*Config) InitDefaults ¶
InitDefaults must populate HTTP values using given HTTP source. Must return error if HTTP is not valid.
type Uploads ¶
type Uploads struct {
// Dir contains name of directory to control access to.
Dir string `mapstructure:"dir"`
// Forbid specifies list of file extensions which are forbidden for access.
// Example: .php, .exe, .bat, .htaccess and etc.
Forbid []string `mapstructure:"forbid"`
// Allowed files
Allow []string `mapstructure:"allow"`
// internal
Forbidden map[string]struct{} `mapstructure:"-"`
Allowed map[string]struct{} `mapstructure:"-"`
}
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.