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"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version = "0.15.0"
|
var Version = "0.15.1"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(versionCmd)
|
rootCmd.AddCommand(versionCmd)
|
||||||
|
|
|
@ -208,10 +208,15 @@ func serveHtmlHandler(paths []string) appHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
filters := Filters{}
|
filters := Filters{}
|
||||||
|
if Filter {
|
||||||
filters.Includes = splitQueryParams(r.URL.Query().Get("include"))
|
filters.Includes = splitQueryParams(r.URL.Query().Get("include"))
|
||||||
filters.Excludes = splitQueryParams(r.URL.Query().Get("exclude"))
|
filters.Excludes = splitQueryParams(r.URL.Query().Get("exclude"))
|
||||||
|
}
|
||||||
|
|
||||||
sortOrder := r.URL.Query().Get("sort")
|
sortOrder := ""
|
||||||
|
if Sort {
|
||||||
|
sortOrder = r.URL.Query().Get("sort")
|
||||||
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case r.URL.Path == "/" && sortOrder == "asc" && refererUri != "":
|
case r.URL.Path == "/" && sortOrder == "asc" && refererUri != "":
|
||||||
|
|
Loading…
Reference in New Issue