There is a reason why this has been implemented that way in the product. It's security.
Of course you can turn it of. You are turning off a security feature of the product. Can you answer the question "are you sure what you are doing, are you aware of consequences and do you accept any negative outcome" with YES? Then go on.
I have not asked this as a question, instead posted this in forum.
We are using this as a security feature only.
I just wanted to add this as a comment to your tutorial, how to turn this security feature off.
Just in case someone reads it and thinks that this is a good idea without being aware of the consequences :-)
Definitely agreed around a security risk, and should be done on the dispatcher level.
Of course it needs to be documented and treated accordingly with controls.
If you are internal facing with a directory, is there a possibility to disable the filter using a wildcard for a subdirectory, or do you need to explicitly name files?
We have the similar issue. We are trying to download the PDf/docx from a AEM community page using File Library component. Wheneven we click on download it shows joson output instead of downloading actual file. It works fine in local host. This is something to do with Dispatcher setting. We have the following filter. It is still not helping. can someone through a light on this?
Header set Content-Disposition attachment
Thanks in advance.