mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(MISP Node): Update credential to support HTTP Request node (#7268)
This commit is contained in:
@@ -19,14 +19,11 @@ export async function mispApiRequest(
|
||||
body: IDataObject = {},
|
||||
qs: IDataObject = {},
|
||||
) {
|
||||
const { baseUrl, apiKey, allowUnauthorizedCerts } = (await this.getCredentials(
|
||||
const { baseUrl, allowUnauthorizedCerts } = (await this.getCredentials(
|
||||
'mispApi',
|
||||
)) as MispCredentials;
|
||||
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
Authorization: apiKey,
|
||||
},
|
||||
method,
|
||||
body,
|
||||
qs,
|
||||
@@ -44,7 +41,7 @@ export async function mispApiRequest(
|
||||
}
|
||||
|
||||
try {
|
||||
return await this.helpers.request(options);
|
||||
return await this.helpers.requestWithAuthentication.call(this, 'mispApi', options);
|
||||
} catch (error) {
|
||||
// MISP API wrongly returns 403 for malformed requests
|
||||
if (error.statusCode === 403) {
|
||||
|
||||
Reference in New Issue
Block a user