dispatcher config | Community
Skip to main content
New Member
June 7, 2024

dispatcher config

  • June 7, 2024
  • 3 replies
  • 1275 views

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.

3 replies

arunpatidar
Community Advisor
Community Advisor
June 7, 2024

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 

Arun Patidar
EduardChAuthor
New Member
June 7, 2024

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" }
aanchal-sikka
Community Advisor
Community Advisor
June 8, 2024

@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
sherinregi-1
Community Advisor
Community Advisor
June 7, 2024

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 

 

kautuk_sahni
Community Manager
Community Manager
June 10, 2024

@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
EduardChAuthor
New Member
June 10, 2024

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.