function outputHeader(request, response)
    trace = request:getTracer()

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

    -- BUNDBITBK-5688: We need to somtimes set 3 cookies with the new LOGINMETHOD cookie
    -- rename Set-Cookie3 header
    local setCookieHeader3 = response:getHeader("Set-Cookie3")
    if (setCookieHeader3 ~= nil) then 
        trace:debug("Set a new cookie: " .. setCookieHeader3)
        response:addHeader("Set-Cookie", setCookieHeader3)
        response:removeHeader("Set-Cookie3")
    end

end