Attempting Jquery Post Request To Spring Controller
I am trying to make a post request with jquery to a spring rest controller I have setup. This works perfectly fine with the $.get request, however the post request is giving me a 4
Solution 1:
403 status = forbidden. You receive this error because you have CSRF protection enabled.
- Solution 1: send csrf token in your post from js
- Solution 2: disable csrf in the spring security configuration.
The csrf protection is usually enabled by default if you have a dependency to spring-security
module
Post a Comment for "Attempting Jquery Post Request To Spring Controller"