mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Fix query parameter handling in server fast render mode
There may be a simpler way to get to the raw path, but this will have to do for now. Fixes #7163
This commit is contained in:
parent
4a3f2427ed
commit
ee67dbeff5
1 changed files with 2 additions and 1 deletions
|
@ -361,7 +361,8 @@ func (f *fileServer) createEndpoint(i int) (*http.ServeMux, string, string, erro
|
|||
}
|
||||
|
||||
if f.c.fastRenderMode && f.c.buildErr == nil {
|
||||
p := r.RequestURI
|
||||
|
||||
p := strings.TrimSuffix(r.RequestURI, "?"+r.URL.RawQuery)
|
||||
if strings.HasSuffix(p, "/") || strings.HasSuffix(p, "html") || strings.HasSuffix(p, "htm") {
|
||||
if !f.c.visitedURLs.Contains(p) {
|
||||
// If not already on stack, re-render that single page.
|
||||
|
|
Loading…
Reference in a new issue