diff --git a/server/auth/types/authentication_type.ts b/server/auth/types/authentication_type.ts index 1b7d87cf6..14ca8ec27 100755 --- a/server/auth/types/authentication_type.ts +++ b/server/auth/types/authentication_type.ts @@ -114,6 +114,7 @@ export abstract class AuthenticationType implements IAuthenticationType { let cookie: SecuritySessionCookie | null | undefined; let authInfo: any | undefined; + // Adds a basic auth credentials headers to requests originated as anonymous user if (this.config.auth.anonymous_auth_enabled) { const anonymousAuthHeaders = { authorization: ANONYMOUS_AUTH_HEADER }; Object.assign(authHeaders, anonymousAuthHeaders); @@ -159,6 +160,7 @@ export abstract class AuthenticationType implements IAuthenticationType { if (request.url.pathname && request.url.pathname.startsWith('/bundles/')) { return toolkit.notHandled(); } + // send to auth workflow return this.handleUnauthedRequest(request, response, toolkit); } diff --git a/server/auth/types/basic/routes.ts b/server/auth/types/basic/routes.ts index aed5cf587..4370c63a3 100755 --- a/server/auth/types/basic/routes.ts +++ b/server/auth/types/basic/routes.ts @@ -212,7 +212,6 @@ export class BasicAuthRoutes { }; if (user.multitenancy_enabled) { - request.headers.authorization = ANONYMOUS_AUTH_HEADER; const selectTenant = resolveTenant({ request, username: user.username, @@ -231,7 +230,6 @@ export class BasicAuthRoutes { return response.redirected({ headers: { location: `${redirectUrl}`, - authorization: ANONYMOUS_AUTH_HEADER, }, }); } else {