AEM: 403 Forbidden occurs when call a Post servlet

后端 未结 3 1874
星月不相逢
星月不相逢 2021-01-25 13:19

My problem is similar with this: CQ5: 403 Forbidden occurs when call a Post servlet but in AEM 6.1

According to accepted answer of above topic, I must remove POST from A

3条回答
  •  孤独总比滥情好
    2021-01-25 13:35

    If you are testing your code on author mode, you get 403 forbidden error for the request. This requires csrf token (Introduced in AEM 6.1 to perform checks on POST, PUT and DELETE requests from browser against CSRF attacks). CSRF token is validated on form submission at the server side. CSRF protection framework is loaded if granite.jquery dependency is added or you can declare dependency granite.csrf.standalone to use the framework. On publish it should work fine before login.

提交回复
热议问题