diff --git a/server/src/main/java/org/cloudfoundry/identity/uaa/zone/MergedZoneBrandingInformation.java b/server/src/main/java/org/cloudfoundry/identity/uaa/zone/MergedZoneBrandingInformation.java index f059575d619..022bc1f5a32 100644 --- a/server/src/main/java/org/cloudfoundry/identity/uaa/zone/MergedZoneBrandingInformation.java +++ b/server/src/main/java/org/cloudfoundry/identity/uaa/zone/MergedZoneBrandingInformation.java @@ -33,6 +33,14 @@ public String getProductLogo() { return tryGet(IdentityZoneHolder.get(), BrandingInformationSource::getProductLogo).orElse(null); } + public String getInlinedBase64PngLogo() { + String logo = getProductLogo(); + if ( logo != null ) { + logo = "data:image/png;base64," + logo; + } + return logo; + } + @Override public String getSquareLogo() { return resolve(BrandingInformationSource::getSquareLogo); diff --git a/server/src/main/resources/templates/web/layouts/main.html b/server/src/main/resources/templates/web/layouts/main.html index 9d6fcad646a..9e00f2f6bc7 100644 --- a/server/src/main/resources/templates/web/layouts/main.html +++ b/server/src/main/resources/templates/web/layouts/main.html @@ -8,9 +8,9 @@ copyrightCompanyName=${branding.getCompanyName() ?: 'CloudFoundry.org Foundation, Inc. '}, copyrightFallback=${'Copyright © ' + copyrightCompanyName + ' ' + #dates.year(#dates.createNow()) + '. All Rights Reserved.'}, copyright=${branding.getFooterLegalText() ?: copyrightFallback}, - brandingLogo=${branding.getProductLogo()}, + brandingLogo=${branding.getInlinedBase64PngLogo()}, fallbackLogo=${isUaa ? assetBaseUrl+'/images/product-logo.png' : null}, - logo=${brandingLogo != null ? 'data:image/png;base64,'+#strings.replace(brandingLogo,T(java.lang.System).getProperty('line.separator'),'') : fallbackLogo}" > + logo=${brandingLogo != null ? #strings.replace(brandingLogo,T(java.lang.System).getProperty('line.separator'),'') : fallbackLogo}" >