Skipped parsing query params if the corresponding flag isn't enabled
This commit is contained in:
parent
6508f2d170
commit
c8a2e56e92
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var Version = "0.15.0"
|
||||
var Version = "0.15.1"
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
|
|
11
cmd/web.go
11
cmd/web.go
|
@ -208,10 +208,15 @@ func serveHtmlHandler(paths []string) appHandler {
|
|||
}
|
||||
|
||||
filters := Filters{}
|
||||
filters.Includes = splitQueryParams(r.URL.Query().Get("include"))
|
||||
filters.Excludes = splitQueryParams(r.URL.Query().Get("exclude"))
|
||||
if Filter {
|
||||
filters.Includes = splitQueryParams(r.URL.Query().Get("include"))
|
||||
filters.Excludes = splitQueryParams(r.URL.Query().Get("exclude"))
|
||||
}
|
||||
|
||||
sortOrder := r.URL.Query().Get("sort")
|
||||
sortOrder := ""
|
||||
if Sort {
|
||||
sortOrder = r.URL.Query().Get("sort")
|
||||
}
|
||||
|
||||
switch {
|
||||
case r.URL.Path == "/" && sortOrder == "asc" && refererUri != "":
|
||||
|
|
Loading…
Reference in New Issue