Our customer web site doesn't have any authenticated user. All users are anonymous.
Components have granite.jquery dependency so csrf protection is enabled automatically.
Dispatcher and publisher instance receiving too many unnecessary csrf token requests.
Is there any way to disable csrf protection on AEM 6.3?
Thanks in advance.
Publisher responds with empty token to csrf requests. Since users are not authenticated.
I think excluded path is used bypass csrf token check for certain destinations.
Our goal is stop browser's csrf token requests so dispatcher will not have to handle them.
It is not a recommendation to remove the token.json call as this token.json call is used to prevent CSRF attacks and removing this would lead to a major security risk. Please refer to the documentation at .
If you still want to remove the call, you need to remove all dependencies to "granite.jquery" in the code.
The CSRF filter/token mechanism only supports authenticated users. So, If you are hosting a static site without any login functionality, you can remove the token call.
Note that the Sling Referrer Filter offers a second layer of CSRF protection which works in all cases, authenticated or not. See Sling Referrer Filter section of security checklist  for reference