mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
test(core): Fix typing issues in tests (no-changelog) (#10244)
This commit is contained in:
@@ -96,9 +96,10 @@ export async function initBinaryDataService(mode: 'default' | 'filesystem' = 'de
|
||||
* Extract the value (token) of the auth cookie in a response.
|
||||
*/
|
||||
export function getAuthToken(response: request.Response, authCookieName = AUTH_COOKIE_NAME) {
|
||||
const cookies: string[] = response.headers['set-cookie'];
|
||||
const cookiesHeader = response.headers['set-cookie'];
|
||||
if (!cookiesHeader) return undefined;
|
||||
|
||||
if (!cookies) return undefined;
|
||||
const cookies = Array.isArray(cookiesHeader) ? cookiesHeader : [cookiesHeader];
|
||||
|
||||
const authCookie = cookies.find((c) => c.startsWith(`${authCookieName}=`));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user