Commit c9ed7238 authored by Olav Morken's avatar Olav Morken

Fix `X-Feide-`-headers not cleared by auth proxy.

`string.sub(k, 8)` in Lua extracts every character from the eight byte
onwards, and not the eight first bytes. Also, `x-feide` is 7 bytes,
not 8. The result is that we only delete headers named something like

This patch fixes this bug by correcting the `sub()`-call, and adding
the trailing `-` to the header name, bringing the length to 8
parent ba453562
Pipeline #3656 passed with stage
in 16 seconds
......@@ -109,7 +109,7 @@ function clearHeaders()
local h = ngx.req.get_headers()
for k, v in pairs(h) do
if string.lower(string.sub(k, 8)) == "x-feide" then
if string.lower(string.sub(k, 1, 8)) == "x-feide-" then
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment