Open yroc92 opened 2 years ago
We might consider dropping the Routes method for the interface and instead requiring that the route & handler be defined in the config?
I'm not a fan of this. I think it makes sense for plugins to provide specific well known endpoints instead of requiring users to set that up for themselves. That's important for documentation and examples, etc.
But yeah, making it a proper module makes sense. I think this is "my fault" because I set up this wiring for the proxy upstreams API (and later reused it for PKI app)
Yeah, our admin API could use better extensibility design. Hence it's undocumented for now.
I want to revisit this after the 2.6 release. Definitely could be useful to have!
I needed to execute some behavior upon configuration via the admin API. I did this by creating a module in the
admin.api.<module>
namespace with the help of @mholt. This is undocumented and not officially supported.Here are some items to consider if Caddy were to support extending the Admin API based on my experience writing this unsupported module:
CaddyModule
)adaptByContentType
,handleLoad
)Routes
method for the interface and instead requiring that the route & handler be defined in the config?