Skip to content

Commit

Permalink
Set CSRF to implicit on generated application
Browse files Browse the repository at this point in the history
closes: #255
  • Loading branch information
erdlet committed Apr 30, 2021
1 parent a47b665 commit dffc5b9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package ${package};

import java.util.Map;

import jakarta.mvc.security.Csrf;
import jakarta.mvc.security.Csrf.CsrfOptions;

import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;

Expand All @@ -8,4 +13,9 @@
*/
@ApplicationPath("/mvc")
public class App extends Application {

@Override
public Map<String, Object> getProperties() {
return Map.of(Csrf.CSRF_PROTECTION, CsrfOptions.IMPLICIT);
}
}

0 comments on commit dffc5b9

Please sign in to comment.