mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-15 18:08:45 -07:00
Expect session cookie for basic auth at /
This commit is contained in:
parent
37beff7745
commit
e6e4df4d70
@ -744,9 +744,11 @@ func TestHTTPLogin(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testWith(true, http.StatusOK, http.StatusOK, "/")
|
||||||
testWith(true, http.StatusOK, http.StatusUnauthorized, "/meta.js")
|
testWith(true, http.StatusOK, http.StatusUnauthorized, "/meta.js")
|
||||||
testWith(true, http.StatusNotFound, http.StatusUnauthorized, "/any-path/that/does/nooooooot/match-any/noauth-pattern")
|
testWith(true, http.StatusNotFound, http.StatusUnauthorized, "/any-path/that/does/nooooooot/match-any/noauth-pattern")
|
||||||
|
|
||||||
|
testWith(false, http.StatusOK, http.StatusOK, "/")
|
||||||
testWith(false, http.StatusOK, http.StatusForbidden, "/meta.js")
|
testWith(false, http.StatusOK, http.StatusForbidden, "/meta.js")
|
||||||
testWith(false, http.StatusNotFound, http.StatusForbidden, "/any-path/that/does/nooooooot/match-any/noauth-pattern")
|
testWith(false, http.StatusNotFound, http.StatusForbidden, "/any-path/that/does/nooooooot/match-any/noauth-pattern")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user