Apache Wicket 9.1 CSRF

Apache Wicket 9.1 CSRF

我正在尝试了解 Apache Wicket 9.1 文档中关于 CSRF 保护的内容。 https://ci.apache.org/projects/wicket/guide/9.x/single.html#_csrf_protection

我不确定是否默认为操作启用 CSRF 保护?或者,这是否需要我在我的 WicketApplication 中引入一个 ResourceIsolationRequestCycleLister 并且仅在此之后操作才受到 CSRF 保护?

@Override
 protected void init() {
  super.init();
  getRequestCycleListeners().add(new ResourceIsolationRequestCycleListener());
  // ...
 }

后面的部分是正确的,即只有在您的应用程序中引入 ResourceIsolationRequestCycleLister 后,操作才会受到 CSRF 保护,而页面请求不会被检查。