Documentation ¶
Index ¶
- type S3Proxy
- func (S3Proxy) CaddyModule() caddy.ModuleInfo
- func (p S3Proxy) HandleDelete(w http.ResponseWriter, r *http.Request, key string) error
- func (p S3Proxy) HandlePut(w http.ResponseWriter, r *http.Request, key string) error
- func (p *S3Proxy) Provision(ctx caddy.Context) (err error)
- func (p S3Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3Proxy ¶
type S3Proxy struct { // The path to the root of the site. Default is `{http.vars.root}` if set, // Or if not set the value is "" - meaning use the whole path as a key. Root string `json:"root,omitempty"` // The AWS region the bucket is hosted in Region string `json:"region,omitempty"` // The name of the S3 bucket Bucket string `json:"bucket,omitempty"` // Use non-standard endpoint for S3 Endpoint string `json:"endpoint,omitempty"` // The names of files to try as index files if a folder is requested. IndexNames []string `json:"index_names,omitempty"` // A glob pattern used to hide matching key paths (returning a 404) Hide []string // Flag to determine if PUT operations are allowed (default false) EnablePut bool // Flag to determine if DELETE operations are allowed (default false) EnableDelete bool // Key that should exist in the bucket and that the proxy will fallback to // if the requested path doesn't exist in the bucket. This is especially // useful to make custom 404 error pages. NotFoundKey string `json:"not_found_key,omitempty"` // contains filtered or unexported fields }
S3Proxy implements a proxy to return objects from S3
func (S3Proxy) CaddyModule ¶
func (S3Proxy) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (S3Proxy) HandleDelete ¶
Click to show internal directories.
Click to hide internal directories.