mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
🐛 Fix issue where the QS would be ignored (#3967)
This commit is contained in:
parent
ff31b961b7
commit
9017fd463f
|
@ -273,7 +273,7 @@ export class Aws implements ICredentialType {
|
||||||
requestOptions: IHttpRequestOptions,
|
requestOptions: IHttpRequestOptions,
|
||||||
): Promise<IHttpRequestOptions> {
|
): Promise<IHttpRequestOptions> {
|
||||||
let endpoint;
|
let endpoint;
|
||||||
let service = requestOptions.qs?.service;
|
let service = requestOptions.qs?.service as string;
|
||||||
let path = requestOptions.qs?.path;
|
let path = requestOptions.qs?.path;
|
||||||
const method = requestOptions.method;
|
const method = requestOptions.method;
|
||||||
const body = requestOptions.body;
|
const body = requestOptions.body;
|
||||||
|
@ -314,9 +314,10 @@ export class Aws implements ICredentialType {
|
||||||
path = customUrl.pathname as string;
|
path = customUrl.pathname as string;
|
||||||
endpoint = customUrl;
|
endpoint = customUrl;
|
||||||
}
|
}
|
||||||
if (service === 's3' && credentials.s3Endpoint) {
|
if (service.includes('.s3')) {
|
||||||
path = `${endpoint.pathname}?${queryToString(query).replace(/\+/g, '%2B')}`;
|
path = `${endpoint.pathname}?${queryToString(query).replace(/\+/g, '%2B')}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const signOpts = {
|
const signOpts = {
|
||||||
headers: requestOptions.headers,
|
headers: requestOptions.headers,
|
||||||
host: endpoint.host,
|
host: endpoint.host,
|
||||||
|
|
|
@ -15,7 +15,13 @@ import {
|
||||||
IWebhookFunctions,
|
IWebhookFunctions,
|
||||||
} from 'n8n-core';
|
} from 'n8n-core';
|
||||||
|
|
||||||
import { IDataObject, IHttpRequestOptions, JsonObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
import {
|
||||||
|
IDataObject,
|
||||||
|
IHttpRequestOptions,
|
||||||
|
JsonObject,
|
||||||
|
NodeApiError,
|
||||||
|
NodeOperationError,
|
||||||
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
export async function awsApiRequest(
|
export async function awsApiRequest(
|
||||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
|
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
|
||||||
|
@ -32,6 +38,7 @@ export async function awsApiRequest(
|
||||||
const credentials = await this.getCredentials('aws');
|
const credentials = await this.getCredentials('aws');
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
qs: {
|
qs: {
|
||||||
|
...query,
|
||||||
service,
|
service,
|
||||||
path,
|
path,
|
||||||
query,
|
query,
|
||||||
|
|
Loading…
Reference in a new issue