fileserver

package
v0.0.0-...-f3abbe6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 5 Imported by: 0

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL