Skip to content

Commit

Permalink
hotfix(core) check enabled_headers while injecting X-Kong-Upstream-St…
Browse files Browse the repository at this point in the history
…atus header

The hotfix commit 75e071b (#3419) changes the configuration property from
`headers` to `enabled_headers`.
The commit did not update a conditional statement introduced in
60c335e (#3263). This commit corrects the check from `headers` to
`enabled_headers`.

This was caught by the test suite and hence no regression test
has been added.
  • Loading branch information
hbagdi committed May 3, 2018
1 parent 75e071b commit ae8c987
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kong/runloop/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ return {
ctx.KONG_HEADER_FILTER_STARTED_AT = now

local upstream_status_header = constants.HEADERS.UPSTREAM_STATUS
if singletons.configuration.headers[upstream_status_header] then
if singletons.configuration.enabled_headers[upstream_status_header] then
local matches, err = re_match(var.upstream_status, "[0-9]+$", "oj")
if err then
log(ERR, "failed to set ", upstream_status_header, " header: ", err)
Expand Down

0 comments on commit ae8c987

Please sign in to comment.