Watchdog - enable forwarding of HTTP headers via CGI-like env vars.

This commit is contained in:
Alex
2017-05-09 09:13:42 +01:00
parent 201d2c20de
commit cc0d351e69
3 changed files with 88 additions and 0 deletions

View File

@ -59,6 +59,8 @@ func (ReadConfig) Read(hasEnv HasEnv) WatchdogConfig {
cfg.writeDebug = parseBoolValue(hasEnv.Getenv("write_debug"))
}
cfg.cgiHeaders = parseBoolValue(hasEnv.Getenv("cgi_headers"))
cfg.marshalRequest = parseBoolValue(hasEnv.Getenv("marshal_request"))
cfg.debugHeaders = parseBoolValue(hasEnv.Getenv("debug_headers"))
@ -82,6 +84,9 @@ type WatchdogConfig struct {
marshalRequest bool
// cgiHeaders will make environmental variables available with all the HTTP headers.
cgiHeaders bool
// prints out all incoming and out-going HTTP headers
debugHeaders bool