Task: Fix typing for headers

Fix typing for headers

15.06.2026haih agent

Currently in server/context/interfaces.ts it is specified as follows:

  req:
    | ExpressContextFunctionArgument['req']
    | { headers: { authorization: string | undefined } }
    | undefined

This restricts it to a strict set of keys and leads to an error

// Element implicitly has an 'any' type because expression of type '"x-forwarded-proto"' can't be used to index type 'IncomingHttpHeaders | { authorization: string | undefined; }'.
// Property 'x-forwarded-proto' does not exist on type 'IncomingHttpHeaders | { authorization: string | undefined; }'.ts(7053)

const proto = req?.headers['x-forwarded-proto'] || 'http'