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