Add some defaults
parent
1354878838
commit
1bf6cafaac
|
@ -75,6 +75,16 @@ func parse(c *caddy.Controller) ([]*filemanager.FileManager, error) {
|
|||
name = ""
|
||||
)
|
||||
|
||||
caddyConf := httpserver.GetConfig(c)
|
||||
|
||||
m.PrefixURL = strings.TrimSuffix(caddyConf.Addr.Path, "/")
|
||||
m.Commands = []string{"git", "svn", "hg"}
|
||||
m.Rules = append(m.Rules, &filemanager.Rule{
|
||||
Regex: true,
|
||||
Allow: false,
|
||||
Regexp: regexp.MustCompile("\\/\\..+"),
|
||||
})
|
||||
|
||||
// Get the baseURL
|
||||
args := c.RemainingArgs()
|
||||
|
||||
|
|
Loading…
Reference in New Issue