I was looking for a way to proxy content from S3 for an internal website. I could not find one that would work so I wrote one! I think others may find it useful as well.
It can be found here:
It is very new and so there certainly may be bugs and perhaps not every feature you may be wanting.
Manipulating the path of a request is usually done with the rewrite handler: Modules - Caddy Documentation – there’s no need, per-se, for your handler to re-implement such logic.
Thank you both for the feedback. I’ve released a new version that supports the root directive. (It now also supports passing through the Range header and passing back a bunch of typical headers from S3.). Also improved the docs - including mentioning the matcher functionality. (As well as the need to use the order directive to use the plugin at the top level.)
Now all I need is a user. (Besides ourselves, of course…)