Skip to main content
New Member
Jun 7, 2024 2:44 PM UTC

dispatcher config

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/conf.dispatcher.d/filters/default_filters.any

 

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,

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

arunpatidar
Community Advisor
Community Advisor
Jun 7, 2024 3:16 PM UTC

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-rule-to-default-filters-any-but-failing/td-p/407801 

Translate
Arun Patidar
EduardChAuthor
New Member
Jun 7, 2024 3:59 PM UTC

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" }
Translate
aanchal-sikka
Community Advisor
Community Advisor
Jun 8, 2024 7:25 AM UTC

@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.

Translate
Aanchal Sikka
sherinregi-1
Community Advisor
Community Advisor
Jun 7, 2024 3:35 PM UTC

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/conf.dispatcher.d/filters/filters.any

 

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

 

Translate
kautuk_sahni
Level 9
Jun 10, 2024 12:00 PM UTC

@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!

Translate
Kautuk Sahni
EduardChAuthor
New Member
Jun 10, 2024 1:29 PM UTC

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.

Translate