tomcat 8.5 及其 9.0 response写cookie 设置damain为 [.test.com] 出错 An invalid domain [.test.com] was specifi

抛出异常:html

java.lang.IllegalArgumentException: An invalid domain [.test.com] was specified for this cookiejava

参考博客:apache

https://www.cnblogs.com/cmlblog/p/7663111.htmltomcat

 

解决方法cookie

一、设置为一级域名 test.com 前面不加 .dom

二、tomcat的CookieProcessor降级 使用LegacyCookieProcessor 而非Rfc6265CookieProcessorpost

<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />this

相关文章
相关标签/搜索