启用Spring Security CSRF保护后,必须使用POST注销:
<c:url var="logoutUrl" value="/logout"/><form action="${logoutUrl}" method="post"> <input type="submit" value="Log out" /> <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/></form>
启用Spring Security CSRF保护后,必须使用POST注销:
<c:url var="logoutUrl" value="/logout"/><form action="${logoutUrl}" method="post"> <input type="submit" value="Log out" /> <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/></form>