Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve tenant resolving from context. #6553

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4535,6 +4535,15 @@ private static String resolveTenantDomain(HttpServletRequest request) {
log.debug("Tenant Qualified URL mode enabled. Retrieving tenantDomain from thread local context.");
}
tenantDomain = IdentityTenantUtil.getTenantDomainFromContext();
if (StringUtils.isNotBlank(tenantDomain)) {
return tenantDomain;
} else {
if (log.isDebugEnabled()) {
log.debug("TenantedSessionsEnabled is enabled, but the tenant domain is not set to the" +
" context. Hence using the tenant domain from the carbon context.");
}
return PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
}
} else {
tenantDomain = request.getParameter(FrameworkConstants.RequestParams.TENANT_DOMAIN);
}
Expand Down