diff --git a/pkg/routes/index.go b/pkg/routes/index.go index ffeabea..e853239 100644 --- a/pkg/routes/index.go +++ b/pkg/routes/index.go @@ -38,6 +38,15 @@ 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)...)