Search code examples
aemaem-6

/bin/aem/test.MY_SELECTOR.json is giving forbidden access message


when appending .json at the end of the path to the sling servlet http://:/bin/aem/test.MY_SELECTOR.json or similar ajax call, I get 403 forbidden access error on the page.

however, if I use: http://:/bin/aem/test.MY_SELECTOR.now or any other string after the (.)dot, it works without issues.

Only .json seems to be the issue.

Is there something blocking from ACS commons.


Solution

  • We need to convert jsonResponse, which is a String to Gson.toJson(jsonResponse)