Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Content-Disposition Header

Avatar

Level 3

I have some html stored under /etc/library/module/ 

when I access these files on AEM 6.2 directly on Server i.e. https://localhost:4502/etc/library/module/module.html

It download's the file instead of opening it in the browser.

Looked at the response header it shows Content-Disposition : attachment.

In 6.0 we have com.day.cq.dam.core.impl.servlet.SafeBinaryGetServlet to control this header.

However in 6.2 this component seems to have deprecated

Can anyone help me to understand how this content-disposition header be controlled in AEM 6.2? 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Check if this works for you.

Apache Sling Content Disposition Filter (org.apache.sling.security.impl.ContentDispositionFilter)

View solution in original post

0 Replies

Avatar

Correct answer by
Community Advisor

Hi,

Check if this works for you.

Apache Sling Content Disposition Filter (org.apache.sling.security.impl.ContentDispositionFilter)

Avatar

Community Advisor

Add the path which you want to exclude in the above configuration

Avatar

Level 3

Thank you Lokesh..

Solution of adding an individual .html file works. However I have 20+ odd files which I'll need to add to this filter.

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.sling/org.apache.sling.security/1.0.10/or...

looks like this filter does not allow regex patterns (*.html) 

just wondering if there is any alternative solution?

Avatar

Administrator

atulj26424737 wrote...

Thank you Lokesh..

Solution of adding an individual .html file works. However I have 20+ odd files which I'll need to add to this filter.

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.sling/org.apache.sling.security/1.0.10/or...

looks like this filter does not allow regex patterns (*.html) 

just wondering if there is any alternative solution?

 

 

 

Hi,

As your primary question is answered, i would request you to please close this question and create new question for follow-up questions.

~kautuk 

Avatar

Level 1

just unchecking the Enable Content Disposition for all paths . Still File is getting downloaded

Avatar

Level 2

atulj26424737 Try adding this Configuration Biding: launchpad:resources/install/5/org.apache.sling.security-1.0.18.jar to Apache Sling Content Disposition Filter

Avatar

Level 2

priyajoshi

Remove the text/html form the Dam Safe Binary Filter osgi configuration