mirror of
https://github.com/nkanaev/yarr.git
synced 2025-09-14 02:10:04 +00:00
basepath fixes
This commit is contained in:
@@ -21,10 +21,10 @@ func (s *Server) handler() http.Handler {
|
||||
// TODO: auth, base, security
|
||||
if s.Username != "" && s.Password != "" {
|
||||
a := &authMiddleware{
|
||||
basepath: BasePath,
|
||||
username: s.Username,
|
||||
password: s.Password,
|
||||
basepath: BasePath + "/",
|
||||
public: BasePath + "/static",
|
||||
public: "/static",
|
||||
}
|
||||
r.Use(a.handler)
|
||||
}
|
||||
@@ -401,6 +401,6 @@ func (s *Server) handlePageCrawl(c *router.Context) {
|
||||
}
|
||||
|
||||
func (s *Server) handleLogout(c *router.Context) {
|
||||
auth.Logout(c.Out)
|
||||
auth.Logout(c.Out, BasePath)
|
||||
c.Out.WriteHeader(http.StatusNoContent)
|
||||
}
|
||||
|
Reference in New Issue
Block a user