Hi.
I have an idea of serving static content from IPFS http-gateway at localhost:8080
.
Caddy will be used as a reverse proxy that not only rewrites URL path but also for every file analyzes if it’s a text file with content starting with some magic prefix like IPFS_REDIRECT 307 ./../another_sub_folder/some_other_file
.
IPFS gateways inherently don’t support http redirects and in this project I want to provide this facility for the purpose of hosting static content at some custom domain name via IPFS. And if content owner decides he want to move his stuff from https://example.com/same_sub_folder/foo.app to https://example.com/same_sub_folder/bar.exe then he just replaces /ipns/example.com/same_sub_folder/foo.app
with a text file /ipns/example.com/same_sub_folder/foo.app
but with a specific magic prefix inside and Caddy should pick it up, parse it and provide a redirect.
I’m totally new to Caddy so I ask for a general guidance and an advice like should I write a plugin or just a config file.