mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-19 01:14:35 +00:00
Add some defaults
This commit is contained in:
parent
1354878838
commit
1bf6cafaac
1 changed files with 10 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue