plugin

package module
v0.0.0-...-bd39ce9 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 11 Imported by: 0

README

caddy-s3-proxy

Scope

Provide a read-only S3 backend for Caddy to serve static files from a private S3 bucket.

Motivation:

  • Serving static files through caddy from a private S3 bucket may have different use-cases.
  • There is another project lindenlab/caddy-s3 which has sadly not been maintained for a long time and causes memory-leaks in production.
  • The file system backed plugins lack control over utilising custom s3 metadata like caching or content-types.

Development

Prerequisites

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	AwsEndpoint  string
	Bucket       string
	UsePathStyle bool
}

func Parse

func Parse(d *caddyfile.Dispenser) (*Configuration, error)

type S3Proxy

type S3Proxy struct {
	Config *Configuration `json:"config,omitempty"`
}

func (*S3Proxy) CaddyModule

func (*S3Proxy) CaddyModule() caddy.ModuleInfo

func (*S3Proxy) Provision

func (m *S3Proxy) Provision(ctx caddy.Context) error

func (*S3Proxy) ServeHTTP

func (m *S3Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

func (*S3Proxy) UnmarshalCaddyfile

func (m *S3Proxy) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

func (*S3Proxy) Validate

func (m *S3Proxy) Validate() error

Directories

Path Synopsis
test
s3

Jump to

Keyboard shortcuts

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