How to enable text compression using OSGi config and dispatcher rules for Json file
Views
Replies
Total Likes
Can you elaborate on what type of compression you are referring to?
I guess you are referring to dispatcher compression, if so, you could use the DEFLATE mod, please take a look at these resources that will guide how to enable this:
https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c...
https://www.albinsblog.com/2018/09/improve-performance-of-adobe-experience.html
Hi,
By default, AEM does not compress JSON files. To enable compression for JSON you can add below in dispatcher.any file
/filter{
/0001
{
/glob "*.json"
/type "allow"
/name "Allow JSON"
/action "gzip"
}
}
After making changes to the Dispatcher configuration, restart the Apache web server to apply the new rules.
Hi @Ravi_Pampana ,
can it be applicable for AEM as Cloud Service.
@rajesh_didshe Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Hi @kautuk_sahni ,
I have tried above both step as @Ravi_Pampana and @EstebanBustamante mentioned. Tried DEFLATE mod but it's not working and for Filter step getting build failure error on action and name. Have attached Screenshot of build error log for same.
To enable text compression using OSGi config and dispatcher rules for JSON files in AEM, you can follow these steps:
Enable text compression in AEM.
filter
configuration.{
"glob": "*.json",
"type": "allow",
"name": "Allow JSON",
"action": "gzip"
}
Configure the Dispatcher.
dispatcher.any
file./filter {
/0001 {
/glob "*.json"
/type "allow"
/name "Allow JSON"
/action "gzip"
}
}
Restart the Dispatcher.
Once you have completed these steps, text compression will be enabled for JSON files in AEM.
Note: If you are using AEM as a Cloud Service, you cannot edit the dispatcher.any
file directly. Instead, you must use the Dispatcher configuration UI. To do this, go to the Dispatcher section of the Cloud Manager and click Edit Configuration. Then, add the filter rule.
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi,
Not able to see Dispatcher section in my Cloud Manager, is there any specific permission required for that.
in AEM CS the dispatcher configuration resides in GIT.
To edit your dispatcher configuration in AEM CS, you can either:
If you need to make changes to your dispatcher configuration that are not supported by the Dispatcher configuration UI, you can edit the dispatcher.any file directly.
Views
Replies
Total Likes
@rajesh_didshe Were you able to succeed?
Views
Replies
Total Likes
dispatcher.any file is immutable, So tried above step in filter.any file but getting build error for action.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies