local kong_meta = require "kong.meta"

local ConsoleHeaderMgmt = {PRIORITY = 1160, VERSION = kong_meta.version}

function ConsoleHeaderMgmt:access(conf)
    kong.service.request.set_header("x-auth-type", "console")
    -- clear the openapi related header, to avoid the header fake issue.
    kong.service.request.clear_header("x-auth-method")
    kong.service.request.clear_header("x-auth-username")
    kong.service.request.clear_header("x-auth-content")
end

return ConsoleHeaderMgmt
