yyyy-MM-dd HH:mm:ss,SSS|ERROR Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the header value “discount_free_trigger=true; freePromorunningtmr=Fri Jan 02 1970 00:06:47 GMT+0800 (???é??); JSESSIONID=999999C999F999C999D999099949997F” is not allowed.
根据内容RequestRejectedException信息后面的报错信息得到一组关键信息
The request was rejected because the header value "
content" is not allowed.
由于不允许标头值“content”,请求被拒绝。
这个问题就很明显了,是其中一个请求头出了问题
让前端修改相关的数据头
另外一种处理方式更简单粗暴,但是貌似不怎么安全
在springboot里面的SpringSecurity配置中添加如下代码,也可以达到效果
@Bean
public HttpFirewall httpFirewall() {
return new DefaultHttpFirewall();
}