Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Permission issue to access /dispatcher/invalidate.cache

Avatar

Level 2
Problem : Pages that contain Experience-Fragment is getting cached after publishing the Experience-fragment
Observation :
  1. Create a Experience Fragment, add this fragment to any content page.
  2. Now, make any content changes in the fragment and publish the fragment, but not the page.
Two scenarios after publishing the fragment
- Individually Experience-Fragment gets updated both in publish environment and dispatcher
- Page that contains Fragment gets updated in publish environment but not in the dispatcher level
Solution :
    As there are some business restrictions we are trying to clear the cache of the pages that contain the fragment through code.-
 - We are trying to make post call to http://host/dispatcher/invalidate.cache and sending our
page path as request header to the post call
- We are following the process as suggested in this Documentation
https://docs.adobe.com/content/help/en/experience-manager-dispatcher/using/configuring/page-invalida...
The issue we are facing is when we make the post call to the URL, we are getting permission issue, 403 Error. Is there any way to give permissions to /dispatcher/invalidate.cache
1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

I believe the host might not be allowed to clear the cache. Can you check the following section? Try with allow "*" to test

 

/allowedClients

    { # Uncomment the following to restrict activation requests to originate

      # from "localhost" only.

    /0000

              {

                  /glob "*"

                        /type "allow”

}

View solution in original post

7 Replies

Avatar

Correct answer by
Employee Advisor

I believe the host might not be allowed to clear the cache. Can you check the following section? Try with allow "*" to test

 

/allowedClients

    { # Uncomment the following to restrict activation requests to originate

      # from "localhost" only.

    /0000

              {

                  /glob "*"

                        /type "allow”

}

Avatar

Level 2
Hi jbrar thanks for the response, this is working but the devops team from client side is not accepting to give the global access to it. Is there any way to do it or can we give global access to it ?

Avatar

Employee Advisor
Allowing "*" was just for testing purpose. You can also add the IP of the server which which trigger the invalidate request. Example:

Avatar

Employee Advisor
/allowedClients { /0001 { /glob "*.*.*.*" /type "deny" } /0002 { /glob "127.0.0.1" /type "allow" } }

Avatar

Level 2
Yes, seems like its allowed for the host but, the path /dispatcher/invalidate.cache is not whitlisted, can we add the path to the dispatcher rules to allow globally? as i am hitting it through code.

Avatar

Employee Advisor
Yes, You can allow "/dispatcher/invalidate.cache" globally. Even after allowing it globally, only hosts that are part of the "/allowedClients" will be allowed to make the cache clear request.