Add keepTrailingSlash option
This commit is contained in:
parent
70fa42aee0
commit
95d86d84b4
6 changed files with 100 additions and 2 deletions
|
@ -627,7 +627,7 @@ func buildProxyProtocolListener(entryPoint *configuration.EntryPoint, listener n
|
|||
|
||||
func (s *Server) buildInternalRouter(entryPointName string) *mux.Router {
|
||||
internalMuxRouter := mux.NewRouter()
|
||||
internalMuxRouter.StrictSlash(true)
|
||||
internalMuxRouter.StrictSlash(!s.globalConfiguration.KeepTrailingSlash)
|
||||
internalMuxRouter.SkipClean(true)
|
||||
|
||||
if entryPoint, ok := s.entryPoints[entryPointName]; ok && entryPoint.InternalRouter != nil {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue