caddy-exec
caddy-exec copied to clipboard
pass_thru option
I want caddy to run a command for updating an html file every time I access that page. My current Caddyfile looks like this::
example.com {
root * /var/www/{host}
route /stats {
exec command-to-update-html-file-at /var/www/example.com/stats/index.html
}
file_server
}
When I access example.com/stats the command is executed but caddy responds with {"status":"success"}. Only accessing example.com/stats/index.html directly shows the generated html.
Is there (or can you add) an option to not respond directly but continue to the file_server directive?