The reason for this may be the analysis of the LogoutController code.
class LogoutController { def index() { if (!request.post && SpringSecurityUtils.getSecurityConfig().logout.postOnly) { response.sendError HttpServletResponse.SC_METHOD_NOT_ALLOWED
Thus, two fixes are available:
1) Modify the Exit link to send a POST request.
<form name="logout" method="POST" action="${createLink(controller:'logout') }"> <input type="submit" value="logout"></form>
2) Or just add the following line to Config.groovy
grails.plugin.springsecurity.logout.postOnly = false
source share