istio-config/uralkal: harden decode-zitadel-headers — replace only with numeric ids, drop the header otherwise
This commit is contained in:
parent
4ca206722b
commit
d49f178603
@ -196,8 +196,13 @@ spec:
|
||||
end
|
||||
|
||||
local decoded = base64_decode(value)
|
||||
if decoded and decoded ~= "" then
|
||||
-- Отличие от prod: заменяем только на ожидаемый вид (id/список id),
|
||||
-- иначе удаляем заголовок — мусорные байты валят приложение
|
||||
-- ("invalid header value for: x-user-id").
|
||||
if decoded and decoded:match("^[%d,]+$") then
|
||||
handle:headers():replace(header_name, decoded)
|
||||
else
|
||||
handle:headers():remove(header_name)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user