Sign inSign up

denbeke/staticsloth

By denbeke

•Updated 11 months ago

A static file server written in Go.

Image
0

10K+

denbeke/staticsloth repository overview

⁠🦥 StaticSloth

Go Report Card Docker Image Size (latest by date)

⚠️ WIP

A static file server written in Go. All configuration is done with environment variables.

⁠Usage

go run cmd/staticsloth/*.go 

⁠Variables

HTTP_ADDRESS: HTTP listen address. Default: :1234

PATH_PREFIX: Path prefix that StaticSloth will serve for. Default: /

DIRECTORY: Directory that will be served. Default: /var/www/html

ACCESS_LOG: Displays access logs when set to 1. Default: 0

GZIP: Compress responses with gzip. Default: 1

CACHE_CONTROL_PATHS: List of (comma separated) paths to set Cache-Control: max-age=X HTTP header for. Example: CACHE_CONTROL_PATHS="/assets,/images,/uploads" Default: none (= disabled)

CACHE_CONTROL_DURATION: Duration value (in seconds) that will be set in the Cache-Control header. Default: none (= disabled)

BLOCK_PATHS: List of (comma separated) paths to block. Example: BLOCK_PATHS="/.git" Default: (= /.git)

⁠Author

Mathias Beke⁠

Tag summary

Content type

Image

Digest

sha256:6f9a8230c…

Size

8.7 MB

Last updated

11 months ago

docker pull denbeke/staticsloth