mirror of
https://github.com/mainnika/nikita-tokarch-uk.git
synced 2026-06-19 18:44:57 +00:00
Append query symbol to the path as well
This commit is contained in:
@@ -49,7 +49,11 @@ func (r *Routes) usePostfixForce(c *routing.Context) (err error) {
|
|||||||
|
|
||||||
fullPath = append(fullPath, '.')
|
fullPath = append(fullPath, '.')
|
||||||
fullPath = append(fullPath, []byte(templates.URLPostfix)...)
|
fullPath = append(fullPath, []byte(templates.URLPostfix)...)
|
||||||
|
|
||||||
|
if c.QueryArgs().Len() > 0 {
|
||||||
|
fullPath = append(fullPath, '?')
|
||||||
fullPath = c.QueryArgs().AppendBytes(fullPath)
|
fullPath = c.QueryArgs().AppendBytes(fullPath)
|
||||||
|
}
|
||||||
|
|
||||||
return r.relativeRedirectBytes(c, fullPath, fasthttp.StatusFound)
|
return r.relativeRedirectBytes(c, fullPath, fasthttp.StatusFound)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user