Categorygithub.com/caddy-plugins/caddy-s3browser
modulepackage
0.2.0
Repository: https://github.com/caddy-plugins/caddy-s3browser.git
Documentation: pkg.go.dev

# README

Caddy s3browser

Example config

dl.example.com {
	s3browser {
		key ADDKEYHERE
		secret ADDSECRETHERE
		bucket ADDBUCKETHERE
		endpoint nyc3.digitaloceanspaces.com
		region us-west-2
		secure true
		refresh 5m
		debug false
	}
	proxy / https://examplebucket.nyc3.digitaloceanspaces.com {
		header_upstream Host examplebucket.nyc3.digitaloceanspaces.com
	}
}

This will provide directory listing for an S3 bucket (you are able to use minio, or other S3 providers). To serve files via Caddy as well you'll need to use the proxy directive as well. The server must be able to have public access to the files in the bucket.

Note: For performance reasons, the file listing is fetched once every 5minutes to reduce load on S3 (or S3 equivalent).

Prior Art

# Functions

No description provided by the author
ContentTypeByExtension returns the MIME type associated with the file based on its extension.
StringArg Assert only one arg and return it.

# Constants

No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author