Posts

Showing posts from December, 2017

AEM 6.3 | Apache Sling Content Disposition Filter | Hosting Static HTML in JCR

Image
In AEM 6.2 and 6.3, when we attempt to hit the static content such as (/content/site/static-page.html), it is treated as a binary download and does the same for all other file types(pdf,css, js, images) where r esponse header shows Content-Disposition as an attachment. In previous versions of AEM (6.1 and below),  com.day.cq.dam.core.impl.servlet.SafeBinaryGetServlet  was there to control response header to render page instead of download.  However from 6.2, this component is  deprecated and t he reason is Apache Sling Content Disposition Filter(org.apache.sling.security.impl.ContentDispositionFilter) took precedence and an intended change made in product from AEM 6.2 onward and was introduced as part of Sling Security Fix. Here we have steps to render static pages: Apache Sling Content Disposition Filter Configuration where static files needs to be added to meet requirements. Configuration can be reverted back to render static p...