Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

dispatcher config

Avatar

Level 1

Hello,

 

there is a default_filters.any file In the archetype:

https://github.com/adobe/aem-project-archetype/blob/develop/src/main/archetype/dispatcher.cloud/src/...

 

How can we whether override or disable the rule as mentioned in the comment

 

# disable this rule to allow mapped content only
/0010 { /type "allow" /extension '(css|eot|gif|ico|jpeg|jpg|js|gif|pdf|png|svg|swf|ttf|woff|woff2|html|mp4|mov|m4v)' /path "/content/*" } 

Thanks,

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6 Replies

Avatar

Community Advisor

Hi @EduardCh 
You can add another entry with override rules in custom file, making changes in default_filters.any would not be reflecting

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/trying-to-add-a-simple-rul... 



Arun Patidar

Avatar

Level 1

thanks for quick response, but if I set for instance by copying this rule e.g { /type "deny" method POST /extension '(css|eot|ico|jpeg|jpg|js|gif|pdf|png|svg|swf|ttf|woff|woff2|html|mp4|mov|m4v)' /path "/content/*"
it will affect others rules in  default_filters.any  file, like 

/0014 { /type "allow" /method "POST" /url "/content/*.form.html" }

Avatar

Community Advisor

@EduardCh 

 

Please apply the deny rule in the specific content tree that you need. The more granular+specific a rule is, lesser are the chances of it conflicting with the other existing rules.


Aanchal Sikka

Avatar

Community Advisor

Hi @EduardCh 

 

There is a filters.any file in the same path https://github.com/adobe/aem-project-archetype/blob/develop/src/main/archetype/dispatcher.cloud/src/...

 

You can override the rule by denying or giving permissions as you need here 

 

Avatar

Administrator

@EduardCh Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni

Avatar

Level 1

There is no good solution to disable /0010 rule

 

  1. Don't include default_filters.any file
    just copy it in the filters.any file and write the rule like 
    /0010 { /type "allow" /method "GET" /extension '(css|eot|gif|ico|jpeg|jpg|js|gif|pdf|png|svg|swf|ttf|woff|woff2|html|mp4|mov|m4v)' /path "/content/*" }
  2. $include "./default_filters.any"
    /0100 { /type "deny" /method "POST" /extension '(css|eot|gif|ico|jpeg|jpg|js|gif|pdf|png|svg|swf|ttf|woff|woff2|html|mp4|mov|m4v)' /path "/content/*" }

    and then put one more time affected rules 

    /0014 { /type "allow" /method "POST" /url "/content/*.form.html" } ect

    in both cases we should track changes in default default_filters.any file and keep in mind automatic cloud updates.