fix(S3 Node): Fix issue when connecting to Supabase storage (#13667)

This commit is contained in:
Jon
2025-03-04 14:37:48 +00:00
committed by GitHub
parent d3ead68059
commit 5fe33efc94
2 changed files with 166 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ export async function s3ApiRequest(
}
}
endpoint.pathname = path;
endpoint.pathname = `${endpoint.pathname === '/' ? '' : endpoint.pathname}${path}`;
// Sign AWS API request with the user credentials
const signOpts = {
@@ -59,7 +59,7 @@ export async function s3ApiRequest(
region: region || credentials.region,
host: endpoint.host,
method,
path: `${path}?${queryToString(query).replace(/\+/g, '%2B')}`,
path: `${endpoint.pathname}?${queryToString(query).replace(/\+/g, '%2B')}`,
service: 's3',
body,
} as Request;