diff options
author | Valery Piashchynski <[email protected]> | 2021-01-18 21:34:55 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-18 21:34:55 +0300 |
commit | a9a206b31e272e0508fff496e9641c4db291ddb7 (patch) | |
tree | 7b63544ead9f87af8493ebfb95a742acc263278e /plugins/http/plugin.go | |
parent | 77be5a1d2db3ca6ce1408f254391c66e0c5367e8 (diff) | |
parent | eaa3aed1188873c734dd6e283111f811745cca61 (diff) |
Merge pull request #483 from spiral/bug/incorrect_env_variables
bug(server): Incorrectly set environment variables
Diffstat (limited to 'plugins/http/plugin.go')
-rw-r--r-- | plugins/http/plugin.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index 70e91cbe..222bf852 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -33,8 +33,8 @@ const ( // PluginName declares plugin name. PluginName = "http" - // EventInitSSL thrown at moment of https initialization. SSL server passed as context. - EventInitSSL = 750 + // RR_HTTP env variable key (internal) if the HTTP presents + RR_HTTP = "RR_HTTP" //nolint:golint,stylecheck ) // Middleware interface @@ -89,6 +89,13 @@ func (s *Plugin) Init(cfg config.Configurer, log logger.Logger, server server.Se return errors.E(op, errors.Disabled) } + // init if nil + if s.cfg.Env == nil { + s.cfg.Env = make(map[string]string) + } + + s.cfg.Env[RR_HTTP] = "true" + s.pool, err = server.NewWorkerPool(context.Background(), poolImpl.Config{ Debug: s.cfg.Pool.Debug, NumWorkers: s.cfg.Pool.NumWorkers, |