mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Make all http requests made with httpRequestWithAuthentication abortable (#11704)
This commit is contained in:
committed by
GitHub
parent
3202e8c946
commit
0d8aada490
@@ -918,6 +918,10 @@ function convertN8nRequestToAxios(n8nRequest: IHttpRequestOptions): AxiosRequest
|
||||
|
||||
axiosRequest.params = n8nRequest.qs;
|
||||
|
||||
if (n8nRequest.abortSignal) {
|
||||
axiosRequest.signal = n8nRequest.abortSignal;
|
||||
}
|
||||
|
||||
if (n8nRequest.baseURL !== undefined) {
|
||||
axiosRequest.baseURL = n8nRequest.baseURL;
|
||||
}
|
||||
@@ -1718,6 +1722,11 @@ export async function httpRequestWithAuthentication(
|
||||
) {
|
||||
removeEmptyBody(requestOptions);
|
||||
|
||||
// Cancel this request on execution cancellation
|
||||
if ('getExecutionCancelSignal' in this) {
|
||||
requestOptions.abortSignal = this.getExecutionCancelSignal();
|
||||
}
|
||||
|
||||
let credentialsDecrypted: ICredentialDataDecryptedObject | undefined;
|
||||
try {
|
||||
const parentTypes = additionalData.credentialsHelper.getParentTypes(credentialsType);
|
||||
|
||||
Reference in New Issue
Block a user