Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
func Serve(fso *FileServerOptions, logger logz2.Logger)
Types ¶
type FileServerOptions ¶
type FileServerOptions struct { Addr string // Default "localhost:8080", TCP address to listen to AddrTLS string // Default "", "TCP address to listen to TLS (aka SSL or HTTPS) requests. Leave empty for disabling TLS ByteRange bool // Default false, "Enables byte range requests if set to true CertFile string // Default "./ssl-cert-snakeoil.pem", "Path to TLS certificate file Compress bool // Default false, "Enables transparent response compression if set to true Dir string // Default "/usr/share/nginx/html", "Directory to serve static files from GenerateIndexPages bool // Default true, "Whether to generate directory index pages KeyFile string // Default "./ssl-cert-snakeoil.key", "Path to TLS key file Vhost bool // Default false, enables virtual hosting by prepending the requested path with the requested hostname }
Click to show internal directories.
Click to hide internal directories.