Add forwardedRequestHeaders in routeTriggers (#17151)

- add `forwardedRequestHeaders` `string[]` column in `core.routeTrigger`
- filter request headers and forward filtered headers to function
payload (avoid spreading unexpectedly token or cookie)
- add `forwardedRequestHeaders` option in twenty-sdk `defineFunction`
util

BREAKING for actual routeTrigger payload but only 16 to migrate in
production
This commit is contained in:
martmull
2026-01-16 10:19:28 +01:00
committed by GitHub
parent 8908e0785f
commit 1917c1c9b9
24 changed files with 820 additions and 23 deletions
@@ -1361,6 +1361,7 @@ export class ApplicationSyncService {
path: triggerToSync.path,
httpMethod: triggerToSync.httpMethod as HTTPMethod,
isAuthRequired: triggerToSync.isAuthRequired,
forwardedRequestHeaders: triggerToSync.forwardedRequestHeaders ?? [],
},
};
@@ -1379,6 +1380,7 @@ export class ApplicationSyncService {
path: triggerToCreate.path,
httpMethod: triggerToCreate.httpMethod as HTTPMethod,
isAuthRequired: triggerToCreate.isAuthRequired,
forwardedRequestHeaders: triggerToCreate.forwardedRequestHeaders ?? [],
serverlessFunctionId,
};