feat: Add request context middleware for config and dependency injection in hooks (#8480)
This commit is contained in:
@@ -270,6 +270,7 @@ export function getRequestObject(
|
||||
log: config.loggerController,
|
||||
headers: config.headers,
|
||||
ip: config.ip,
|
||||
config,
|
||||
};
|
||||
|
||||
if (isGet !== undefined) {
|
||||
@@ -320,6 +321,7 @@ export function getRequestQueryObject(triggerType, auth, query, count, config, c
|
||||
headers: config.headers,
|
||||
ip: config.ip,
|
||||
context: context || {},
|
||||
config,
|
||||
};
|
||||
|
||||
if (!auth) {
|
||||
@@ -1018,6 +1020,7 @@ export function getRequestFileObject(triggerType, auth, fileObject, config) {
|
||||
log: config.loggerController,
|
||||
headers: config.headers,
|
||||
ip: config.ip,
|
||||
config,
|
||||
};
|
||||
|
||||
if (!auth) {
|
||||
|
||||
Reference in New Issue
Block a user