Merge branch 'develop' into main

develop
Nikita Tokarchuk 3 years ago
commit 87b4171629
Signed by: mainnika
GPG Key ID: A595FB7E3E56911C
  1. 10
      pkg/routes/index.go

@ -38,8 +38,18 @@ func (r *Routes) usePostfixForce(c *routing.Context) (err error) {
return c.Next()
}
fullPath = bytes.TrimRightFunc(fullPath, func(r rune) bool {
switch r {
case '/':
return true
default:
return false
}
})
fullPath = append(fullPath, '.')
fullPath = append(fullPath, []byte(templates.URLPostfix)...)
fullPath = c.QueryArgs().AppendBytes(fullPath)
return r.relativeRedirectBytes(c, fullPath, fasthttp.StatusFound)
}

Loading…
Cancel
Save