From 2569a1389de140a7fdd618bf691ea15b244e7883 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Mon, 29 Apr 2024 19:40:40 +0530 Subject: [PATCH] feat(#1667): None means None --- packages/bruno-cli/src/runner/prepare-request.js | 13 +------------ .../src/ipc/network/prepare-request.js | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/packages/bruno-cli/src/runner/prepare-request.js b/packages/bruno-cli/src/runner/prepare-request.js index f0cec7cf1..9dcd8d704 100644 --- a/packages/bruno-cli/src/runner/prepare-request.js +++ b/packages/bruno-cli/src/runner/prepare-request.js @@ -32,19 +32,8 @@ const prepareRequest = (request, collectionRoot) => { headers: headers }; - /** - * 27 Feb 2024: - * ['inherit', 'none'].includes(request.auth.mode) - * We are mainitaining the old behavior where 'none' used to inherit the collection auth. - * - * Very soon, 'none' will be treated as no auth and 'inherit' will be the only way to inherit collection auth. - * We will request users to update their collection files to use 'inherit' instead of 'none'. - * Don't want to break ongoing CI pipelines. - * - * Hoping to remove this by 1 April 2024. - */ const collectionAuth = get(collectionRoot, 'request.auth'); - if (collectionAuth && ['inherit', 'none'].includes(request.auth.mode)) { + if (collectionAuth && request.auth.mode === 'none') { if (collectionAuth.mode === 'basic') { axiosRequest.auth = { username: get(collectionAuth, 'basic.username'), diff --git a/packages/bruno-electron/src/ipc/network/prepare-request.js b/packages/bruno-electron/src/ipc/network/prepare-request.js index 37196589a..e8c88275f 100644 --- a/packages/bruno-electron/src/ipc/network/prepare-request.js +++ b/packages/bruno-electron/src/ipc/network/prepare-request.js @@ -30,20 +30,9 @@ const parseFormData = (datas, collectionPath) => { return form; }; -/** - * 27 Feb 2024: - * ['inherit', 'none'].includes(request.auth.mode) - * We are mainitaining the old behavior where 'none' used to inherit the collection auth. - * - * Very soon, 'none' will be treated as no auth and 'inherit' will be the only way to inherit collection auth. - * We will request users to update their collection files to use 'inherit' instead of 'none'. - * Don't want to break ongoing CI pipelines. - * - * Hoping to remove this by 1 April 2024. - */ const setAuthHeaders = (axiosRequest, request, collectionRoot) => { const collectionAuth = get(collectionRoot, 'request.auth'); - if (collectionAuth && ['inherit', 'none'].includes(request.auth.mode)) { + if (collectionAuth && request.auth.mode === 'inherit') { switch (collectionAuth.mode) { case 'awsv4': axiosRequest.awsv4config = {