24 ms·
A big missing feature in Caddy for me is an embedded language like Lua for nginx so you can write tiny hooks. The Caddy authors have indicated on HN a while ago
by eatonphil 5y ago
A big missing feature in Caddy for me is an embedded language like Lua for nginx so you can write tiny hooks. The Caddy authors have indicated on HN a while ago that Caddy 2 may have an embedded scripting language but I can't find anything about it in their docs.
- coder543 5y agoSeems like it was postponed[0]. For very tiny hooks, you might be able to get away with using request matchers[1] and respond[2]. [0]: https://caddy.community/t/missing-starlark-documentation/9580/5 https://caddy.community/t/missing-starlark-documentation/958... [1]: https://caddyserver.com/docs/caddyfile/matchers https://caddyserver.com/docs/caddyfile/matchers [2]: https://caddyserver.com/docs/caddyfile/directives/respond https://caddyserver.com/docs/caddyfile/directives/respond
- francislavoie 5y agoWriting plugins for Caddy is so easy that it's generally not necessary to have scripting built-in. You can just build yourself a new binary with a Go plugin just by using the "xcaddy" build tool. https://caddyserver.com/docs/extending-caddy https://caddyserver.com/docs/extending-caddy But yeah, it's still something at the back of our minds, and we were considering Starlark for this, but that hasn't really materialized because it's usually easier to just go with the plugin route.