Add keepTrailingSlash option

This commit is contained in:
SALLEYRON Julien 2018-10-17 14:22:03 +02:00 committed by Traefiker Bot
parent 70fa42aee0
commit 95d86d84b4
6 changed files with 100 additions and 2 deletions

View file

@ -633,7 +633,7 @@ func buildDefaultCertificate(defaultCertificate *traefiktls.Certificate) (*tls.C
func (s *Server) buildDefaultHTTPRouter() *mux.Router {
rt := mux.NewRouter()
rt.NotFoundHandler = s.wrapHTTPHandlerWithAccessLog(http.HandlerFunc(http.NotFound), "backend not found")
rt.StrictSlash(true)
rt.StrictSlash(!s.globalConfiguration.KeepTrailingSlash)
rt.SkipClean(true)
return rt
}