adn-agov-iam-project/patterns/4f6692a69e4f33c8ed4c145f_sc.../responseHeaderPostProcessin...

12 lines
394 B
Lua

function outputHeader(request, response)
trace = request:getTracer()
-- rename Set-Cookie2 header
local setCookieHeader = response:getHeader("Set-Cookie2")
if (setCookieHeader ~= nil) then
trace:debug("Set a new cookie: " .. setCookieHeader)
response:addHeader("Set-Cookie", setCookieHeader)
response:removeHeader("Set-Cookie2")
end
end