feat(#1655): inherit auth mode for requests

This commit is contained in:
lohxt1
2024-02-26 14:27:59 +05:30
parent 117726a01f
commit 3c2cbe63c4
7 changed files with 35 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ const prepareRequest = (request, collectionRoot) => {
// But it cannot override the collection auth with no auth
// We will provide support for disabling the auth via scripting in the future
const collectionAuth = get(collectionRoot, 'request.auth');
if (collectionAuth) {
if (collectionAuth && request.auth.mode == 'inherit') {
if (collectionAuth.mode === 'basic') {
axiosRequest.auth = {
username: get(collectionAuth, 'basic.username'),