Hello Sling Users

I am working on an upgrade and have found the changes to 
org.apache.sling.security.impl.ContentDispositionFilter present problems with 
rendering robots.txt (text/plain) from a location managed under the dam. After 
the upgrade it has the header Content-Disposition: attachment. As a result we 
have started seeing our testing URL’s in search results, which indicates the 
search-bots are not opening and reading

org.apache.sling.security version 1.1.2 ContentDispositionFilter had a ranking 
of -2500 (txt file renders)
org.apache.sling.security version 1.1.12        ContentDispositionFilter had a 
ranking of 25000 (txt file downloads)

My attempts to configure Apache Sling Content Disposition Filter have failed. 
Adding the fully qualified path to "Excluded Resource Paths" does not work. My 
question related to the section titled "Included Resource Paths & Content 
Types.” There is a cryptic instruction copied below. What does this mean? 
Please provide en example specifying the path, excluded content types 

> These resource paths are covered by the filter. Each entry is of the form 
> '<path> [ : <excluded content type> {,<excluded content type>} ]'. Invalid 
> entries are logged and ignored. <path> must be an absolute path and may 
> contain a wildcard ('*') at the end, to match every resource path with the 
> given path prefix. (sling.content.disposition.paths)


I have guessed at different entries, but they do not take affect. 
/content/path/robots.txt[text/plain]
/content/path/robots.txt [text/plain]
/content/path/robots.txt:text/plain

If I uncheck "Enable For All Resource Paths” in the Apache Sling Content 
Disposition Filter, then the header Content-Disposition: attachment goes away 
and it renders as expected. But seems like an extreme solution especially given 
the fact that Content Disposition Filter was used and worked at the previous 
version mentioned. Please note that although I have provided some context about 
the a specific problem, my question is about how to configure "Included 
Resource Paths & Content Types” using path and mime types.

Thanks!
Cris

Reply via email to