mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
18 lines
410 B
TypeScript
18 lines
410 B
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
|
|
const context = (args: any) => {
|
|
const authorization = args.req.headers.authorization
|
|
let token = null
|
|
if (authorization) {
|
|
token = authorization.replace(/^Bearer /, '')
|
|
}
|
|
const context = {
|
|
token,
|
|
setHeaders: [],
|
|
}
|
|
return context
|
|
}
|
|
|
|
export default context
|