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

相關文章
相關標籤/搜索