Server
When a web server is started using the --config option of the server command these options are available at the top-level of the TOML file.
listenIP address to bind to (default0.0.0.0)portPort for the HTTP server (default8888)redirect-insecureRedirect HTTP to HTTPS (optional, defaulttrue)
The redirect-secure option only applies when a SSL server is configured.
SSL
To configure an SSL server use the [[ssl]] table:
certPath to the SSL certificate file (required)keyPath to the SSL key file (required)portPort for the SSL server (required)
The SSL certificate should include Subject Alternative Names for each virtual host name or use a wildcard for subdomains, eg: *.example.com.
Hosts
Virtual hosts defined in a [[host]] table support these fields:
nameName of the virtual host (required)directoryPath to the directory for static files (required)logLog server requests (optional, defaultfalse)require-indexRequire anindex.htmlfile indirectory(optional, defaulttrue)disable-cacheSend headers to clients to disable caching (optional, defaultfalse)deny-iframeAdd a header to prevent the embedding in iframes (optional, defaulttrue)
If directory is a relative path it is resolved using the parent folder of the configuration file.