mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
✨ OPTIONS request support for Production/Test Webhooks (#787)
* 🐛 Fix naming of events in AffinityTrigger Node * 🚧 OPTIONS allow header response for production webhooks * ✅ Implemented Allow header for test webhook OPTIONS response Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -85,6 +85,21 @@ export class ActiveWebhooks {
|
||||
return this.webhookUrls[webhookKey];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all request methods associated with a single webhook
|
||||
* @param path
|
||||
*/
|
||||
getWebhookMethods(path: string): string[] {
|
||||
let methods : string[] = [];
|
||||
|
||||
Object.keys(this.webhookUrls)
|
||||
.filter(key => key.includes(path))
|
||||
.map(key => {
|
||||
methods.push(key.split('|')[0]);
|
||||
});
|
||||
|
||||
return methods;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ids of all the workflows which have active webhooks
|
||||
|
||||
Reference in New Issue
Block a user