Require username and password for authentication

This commit is contained in:
Audrius Butkevicius 2014-09-13 22:06:25 +01:00
parent 24cbcef620
commit c45e3fa4d5
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) erro
handler = withVersionMiddleware(handler)
// Wrap everything in basic auth, if user/password is set.
if len(cfg.User) > 0 {
if len(cfg.User) > 0 && len(cfg.Password) > 0 {
handler = basicAuthAndSessionMiddleware(cfg, handler)
}