I noticed when doing my own embedding of Caddy that the server only uses the caddy.AppName
and caddy.AppVersion
variables to identify itself over the FCGI protocol, and not as the Server
header Product Token. I’ve submitted the PR below to resolve this.
I’d like to start a discussion around the inclusion of more version information for plugins, and identifying them externally to Caddy with the Server headers Product Tokens. The externalisation of which plugins the server uses is something not everyone wants so a new directive would need to be added. It also seems’ as though caddy.DescribePlugins()
should output the version of the plugin its using.
TLDR;
The question is really how would the maintainers and plugin authors like the versioning to work. Should we automatically include such information during the build process. I was personally thinking of the tag and commit ref., should be enough to identify the exact version of code being used?
What other web servers do:
Relevant RFC docs:
https://github.com/mholt/caddy/pull/1013
Example of possible DescribePlugins() output:
#caddy -plugins
Server types:
http
Caddyfile loaders:
short
flag
default
Other plugins:
...
http.filemanager (#cf1b563) https://github.com/hacdias/caddy-filemanager
http.ipfilter (#7fd8aa5) https://github.com/pyed/ipfilter
http.jwt (v1.0.1#1509a31) https://github.com/BTBurke/caddy-jwt
http.mailout (v1.0.0#f289025) https://github.com/SchumacherFM/mailout
http.ratelimit (#164fb91) https://github.com/xuqingfeng/caddy-rate-limit
...
Example of possible Server header:
Server: Caddy/0.9.0#f28af63 FileManager IpFilter JWT/v1.0.1 Mailout/v1.0.0 RateLimit