A request has been denied as a potential CSRF attack.”

在web.xml配置文件中修改dwr的配置:

Xml代码

 

  1. <servlet>  
  2.  <servlet-name>dwr-invoker</servlet-name>  
  3.   <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>  
  4.   <init-param>  
  5.    <param-name>debug</param-name>  
  6.    <param-value>true</param-value>  
  7.   </init-param>  
  8.   <!-- 新加corssDomainSessionSecurity参数 -->  
  9.   <init-param>      
  10.             <param-name>crossDomainSessionSecurity</param-name>      
  11.             <param-value>false</param-value>      
  12.     </init-param>  
  13.  </servlet>  

 加入红色部分后。问题就消失了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-04-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-12
  • 2022-02-15
  • 2021-12-26
  • 2021-07-03
  • 2021-08-30
  • 2022-12-23
相关资源
相似解决方案