We are trying to get a servlet visible in the publisher, and understand we have to add a rule to the dispatcher.
Build works fine against the local cloud SDK, but when the source is pushed to cloud, build fails with:
There have been changes detected in a file which is supposed to be immutable according to https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/content-delivery/disp-overview.html#file-structure: src/conf.dispatcher.d/filters/default_filters.any
We are trying to make our servlets on /bin/xxx visible, and this is the way to do it:
/005 { /type "allow" /url "/bin/*" } # allow bin path access
We tried adding this line to myapp.dispatcher.cloud/src/conf.dispatcher.d/filters/filters.any, but this had no effect.
Next we tried commenting out the line which already existed in default_filters.any, but this results in the above build error.
Any ideas how to make a servlet path visible on publish instance?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Please update filters.any file.
defualt_filter changes will not be reflected if you directly made changes there.
e.g. of filters.any
$include "./default_filters.any"
#### Custom rules
/0100 { /type "allow" /path "/content/myproj/*" /extension '(html|jsp|json|pdf)' }
Hi @TB3dock
Here is the sample path:
ams_publish_filter.any will be used for the publish instance.
You can identify which file is mapped for publish by going to 999_ams_publish_farm.any and check for the filter section which will show which file is loading for the filter rules.
/filter {
$include "../filters/ams_publish_filters.any"
}
# deny everything and allow specific entries
# Start with everything blocked as a safeguard and open things customers need and what's safe OOTB
/0001 { /type "deny" /url "*" }
# Open consoles if this isn't a production environment by uncommenting the next few lines
# /002 { /type "allow" /url "/crx/*" } # allow content repository
# /003 { /type "allow" /url "/system/*" } # allow OSGi console
# allow non-public content directories if this isn't a production environment by uncommenting the next few lines
# /004 { /type "allow" /url "/apps/*" } # allow apps access
/005 { /type "allow" /url "/bin/*" } # allow bin path access
Also try changing the rule numbers such as if 005 is not taking put something like 007 or 111 and try it out.
Hi,
Please update filters.any file.
defualt_filter changes will not be reflected if you directly made changes there.
e.g. of filters.any
$include "./default_filters.any"
#### Custom rules
/0100 { /type "allow" /path "/content/myproj/*" /extension '(html|jsp|json|pdf)' }
Views
Replies
Total Likes
@TB3dock As per the documentation, you should not touch any OOTB files came by default from archetype or AMS.
You should create your custom farm in available farms directory, and include custom filters file and then put your logic in that, make that custom farm in enabled farms as softlink.
Views
Likes
Replies
Views
Likes
Replies