HTTPServerSettings

Contains all settings for configuring a basic HTTP server.

The defaults are sufficient for most normal uses.

Constructors

this
this()

Constructs a new settings object with default values.

this
this(string bind_string)

Constructs a new settings object with a custom bind interface and/or port.

Members

Properties

dup
HTTPServerSettings dup [@property getter]

Returns a duplicate of the settings object.

errorPageHandler
HTTPServerErrorPageHandler errorPageHandler [@property getter]
HTTPServerErrorPageHandler errorPageHandler [@property setter]

Sets a custom handler for displaying error pages for HTTP errors

errorPageHandler
void delegate(HTTPServerRequest, HTTPServerResponse, HTTPServerErrorInfo) @(system) errorPageHandler [@property setter]

Scheduled for deprecation - use a @safe callback instead.

Variables

accessLogFile
string accessLogFile;

Spefifies the name of a file to which access log messages are appended.

accessLogFormat
string accessLogFormat;

Specifies the format used for the access log.

accessLogToConsole
bool accessLogToConsole;

If set, access log entries will be output to the console.

accessLogger
HTTPLogger accessLogger;

Specifies a custom access logger instance.

bindAddresses
string[] bindAddresses;

The interfaces on which the HTTP server is listening.

disableDistHost
bool disableDistHost;

Disable support for VibeDist and instead start listening immediately.

hostName
string hostName;

Determines the server host name.

keepAliveTimeout
Duration keepAliveTimeout;

Maximum time between two request on a keep-alive connection

maxRequestHeaderSize
ulong maxRequestHeaderSize;

Maximum number of transferred bytes for the request header. This includes the request line the url and all headers.

maxRequestSize
ulong maxRequestSize;

Maximum number of transferred bytes per request after which the connection is closed with an error

maxRequestTime
Duration maxRequestTime;

Time of a request after which the connection is closed with an error; not supported yet

options
HTTPServerOption options;

Configures optional features of the HTTP server

port
ushort port;

The port on which the HTTP server is listening.

rejectConnectionPredicate
RejectConnectionPredicate rejectConnectionPredicate;

Provides a way to reject incoming connections as early as possible.

serverString
string serverString;
Undocumented in source.
sessionIdCookie
string sessionIdCookie;
Undocumented in source.
sessionOptions
SessionOption sessionOptions;

Session options to use when initializing a new session.

sessionStore
SessionStore sessionStore;

Session management is enabled if a session store instance is provided

tlsContext
TLSContext tlsContext;

If set, a HTTPS server will be started instead of plain HTTP.

useCompressionIfPossible
bool useCompressionIfPossible;

Responds to "Accept-Encoding" by using compression if possible.

webSocketPingInterval
Duration webSocketPingInterval;

Interval between WebSocket ping frames.

Meta