Update handler.go

Former-commit-id: f6bd29025c97d04b058584fecb8e0fee91021cb1
This commit is contained in:
wozz 2018-04-20 16:56:12 -07:00 committed by GitHub
parent 923d151190
commit 21a31afb55

View File

@ -152,7 +152,7 @@ func (h *routerHandler) HandleRequest(ctx context.Context) {
path := ctx.Path()
if !ctx.Application().ConfigurationReadOnly().GetDisablePathCorrection() {
if len(path) > 1 && strings.HasSuffix(path, '/') {
if len(path) > 1 && strings.HasSuffix(path, "/") {
// Remove trailing slash and client-permanent rule for redirection,
// if confgiuration allows that and path has an extra slash.