configuring spring security for HTTP POST method
I am using spring security 3.0.
I want to disable authentication for a url that handles POST method. This doesnt seem to work -
<http use-expressions="true" auto-config="true">
<intercept-url pattern="/index.html" access="permitAll()"/>
<intercept-url method="POST" pattern="/api/feedback/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<anonymous/>
</http>
method="POST" doesnt seem to be working and I get an authorization error POSTi开发者_StackOverflow社区ng to that url.
What should I do?
Considereing the permitAll
is working, I can tell that you're using expressions, so you must change IS_AUTHENTICATED_ANONYMOUSLY
to isAnonymous()
or permitAll
edit: other way, should be to change to hasRole('ROLE_ANONYMOUS')
your shot ;)
精彩评论