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
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.