]> Sergey Matveev's repositories - godlighty.git/blobdiff - cfg.go
More MIMEs
[godlighty.git] / cfg.go
diff --git a/cfg.go b/cfg.go
index 321941dbbbc521d427a761ab97b78e9b06c4c9b0..9bc1206076bd399dae9d8c752f3f0a28f6b87a24 100644 (file)
--- a/cfg.go
+++ b/cfg.go
@@ -25,20 +25,29 @@ type TLSCfg struct {
        Cert   string
        Key    string
        CACert string
+
+       // Require client authentication
+       ClientCAs []string
+}
+
+type AuthCfg struct {
+       Passwords string
+       Realm     string
 }
 
 type Hook func(http.ResponseWriter, *http.Request) bool
 
 type HostCfg struct {
-       Root         string
-       Index        string
-       TLS          *TLSCfg
-       DirList      bool
-       WebDAV       bool
-       Hooks        []Hook
-       MIMEOverride map[string]string
-
-       DirListReadmes []string
+       Root    string
+       TLS     *TLSCfg
+       DirList bool
+       WebDAV  bool
+       Hooks   []Hook
+       Auth    *AuthCfg
+
+       Indexes []string
+       Readmes []string
+       MIMEs   map[string]string
 }
 
 var Hosts = make(map[string]*HostCfg)