Security
CSRF protection
@Override public Map<String, Object> getProperties() { Map<String, Object> props = new HashMap<>(); props.put(Csrf.CSRF_PROTECTION, Csrf.CsrfOptions.EXPLICIT); //view folder //props.put(ViewEngine.DEFAULT_VIEW_FOLDER, ViewEngine.VIEW_FOLDER); return super.getProperties(); }@POST @CsrfValid @ValidateOnExecution(type = ExecutableType.NONE) public Response save(@Valid @BeanParam TaskForm form) { }<input type="hidden" name="${mvc.csrf.name}" value="${mvc.csrf.token}"/>
MvcContext
Source Codes
Last updated