mirror of
https://github.com/caddyserver/caddy.git
synced 2025-08-26 03:11:58 +08:00
Various fixes/tweaks to HTTP placeholder variables and file matching
- Rename http.var.* -> http.vars.* to be more consistent - Prefixing a path matcher with * now invokes simple suffix matching - Handlers and matchers that need a root path default to {http.vars.root} - Clean replacer output on the file matcher's file selection suffix
This commit is contained in:
@ -57,6 +57,10 @@ func (FileServer) CaddyModule() caddy.ModuleInfo {
|
||||
|
||||
// Provision sets up the static files responder.
|
||||
func (fsrv *FileServer) Provision(ctx caddy.Context) error {
|
||||
if fsrv.Root == "" {
|
||||
fsrv.Root = "{http.vars.root}"
|
||||
}
|
||||
|
||||
if fsrv.IndexNames == nil {
|
||||
fsrv.IndexNames = defaultIndexNames
|
||||
}
|
||||
|
Reference in New Issue
Block a user