small moves
This commit is contained in:
parent
a54d4bc15e
commit
5e667295ac
@ -12,12 +12,15 @@ import (
|
||||
"text/template"
|
||||
|
||||
cfsslconfig "github.com/cloudflare/cfssl/config"
|
||||
restful "github.com/emicklei/go-restful"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
|
||||
"novit.nc/direktil/pkg/config"
|
||||
"novit.nc/direktil/pkg/localconfig"
|
||||
)
|
||||
|
||||
var cmdlineParam = restful.QueryParameter("cmdline", "Linux kernel cmdline addition")
|
||||
|
||||
type renderContext struct {
|
||||
Host *localconfig.Host
|
||||
SSLConfig string
|
||||
@ -34,7 +37,7 @@ func renderCtx(w http.ResponseWriter, r *http.Request, ctx *renderContext, what
|
||||
return err
|
||||
}
|
||||
|
||||
ctx.CmdLine = r.URL.Query().Get("cmdline")
|
||||
ctx.CmdLine = r.URL.Query().Get(cmdlineParam.Data().Name)
|
||||
|
||||
if ctx.CmdLine != "" {
|
||||
what = what + "?cmdline=" + url.QueryEscape(ctx.CmdLine)
|
||||
|
@ -12,11 +12,7 @@ import (
|
||||
"novit.nc/direktil/pkg/localconfig"
|
||||
)
|
||||
|
||||
var (
|
||||
trustXFF = flag.Bool("trust-xff", true, "Trust the X-Forwarded-For header")
|
||||
|
||||
cmdlineParam = restful.QueryParameter("cmdline", "Linux kernel cmdline addition")
|
||||
)
|
||||
var trustXFF = flag.Bool("trust-xff", true, "Trust the X-Forwarded-For header")
|
||||
|
||||
type wsHost struct {
|
||||
prefix string
|
||||
|
Loading…
Reference in New Issue
Block a user