mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
Require username and password for authentication
This commit is contained in:
parent
24cbcef620
commit
c45e3fa4d5
@ -136,7 +136,7 @@ func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) erro
|
|||||||
handler = withVersionMiddleware(handler)
|
handler = withVersionMiddleware(handler)
|
||||||
|
|
||||||
// Wrap everything in basic auth, if user/password is set.
|
// 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)
|
handler = basicAuthAndSessionMiddleware(cfg, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user