Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass_thru option #15

Closed
RubixDev opened this issue Mar 21, 2022 · 1 comment
Closed

pass_thru option #15

RubixDev opened this issue Mar 21, 2022 · 1 comment

Comments

@RubixDev
Copy link

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?

@andrewbrey
Copy link
Contributor

@abiosoft I don't know why GH didn't auto-close this issue, when you merged #19 , but I believe that you can close this as complete 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants