https://github.com/techknowlogick/caddy-s3browser
[Archived] Caddy plugin to generate file indexes of S3 buckets to browse via Web Client. Please contact me if you need commercial support.
https://github.com/techknowlogick/caddy-s3browser
aws-s3 caddy caddy-plugin s3
Last synced: 7 months ago
JSON representation
[Archived] Caddy plugin to generate file indexes of S3 buckets to browse via Web Client. Please contact me if you need commercial support.
- Host: GitHub
- URL: https://github.com/techknowlogick/caddy-s3browser
- Owner: techknowlogick
- License: mit
- Archived: true
- Created: 2018-11-04T19:26:42.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2022-06-03T22:25:28.000Z (about 4 years ago)
- Last Synced: 2024-10-26T21:27:22.054Z (over 1 year ago)
- Topics: aws-s3, caddy, caddy-plugin, s3
- Language: Go
- Homepage:
- Size: 311 KB
- Stars: 81
- Watchers: 4
- Forks: 10
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Caddy s3browser
This will provide directory listing for an S3 bucket (you are able to use minio, or other S3 providers).
Note: For performance reasons, the file listing is fetched once every 5 minutes to reduce load on S3. You can force a refresh by sending a POST request to the plugin.
## Building
Use [xcaddy](https://github.com/caddyserver/xcaddy) to build.
Example:
````bash
$ xcaddy build --output ./caddy --with github.com/techknowlogick/caddy-s3browser@main
````
## Configuration
See `Caddyfile.tmpl` for a template.
| option | type | default | help |
|-----------|:------:|------------|------|
| site_name | string | S3 Browser | Site display name |
| endpoint | string | | S3 hostname |
| region | string | empty | S3 region (optional) |
| key | string | | S3 access key |
| secret | string | | S3 secret key |
| secure | bool | `true` | Use TLS when connection to S3 |
| bucket | string | | S3 bucket |
| refresh_interval | string | `5m` | Time between periodic refresh |
| refresh_api_secret | string | empty | A key to protect the refresh API. (optional) |
| debug | bool | `false` | Output debug information |
| signed_url_redirect | bool | `false` | Output debug information |
## Force Refresh
You can trigger a force refresh by making a POST request to the server:
```bash
curl -X POST "$HOST"
```
When `refresh_api_secret` is set, you must use HTTP basic auth:
```bash
curl -X POST "api:$SECRET@$HOST" # the username can be anything
```
## Prior Art
* This is based on the [Browse plugin](https://github.com/mholt/caddy/tree/master/caddyhttp/browse) that is built into Caddy
* [s3server](https://github.com/jessfraz/s3server) from jessfraz
* [pretty-s3-index-html](https://github.com/nolanlawson/pretty-s3-index-html) by Nolan Lawson