`
sillycat
  • 浏览: 2498657 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Jetty Server and Cookie Domain Name

 
阅读更多
Jetty Server and Cookie Domain Name

Recently, we found that our JAVA application is write a JSESSIONID in the cookie for our domain.

The page we have is manage.sillycat.com, so the JESSIONID is writing to the manage.sillycat.com as well. But for some other projects, SSO/UI we need that domain name to be *.sillycat.com.

But it seems the JESSIONID is generated by jetty itself, and I did not do anything there. So I need to read the source codes in jetty to finish that.

Here is the main change:
CustomSessionManager sessionManager = new CustomSessionManager();
if (!MasterServerUtils.isNullOrEmpty(MasterServerProxySetting.MASTERSERVERPROXY_COOKIE_DOMAIN)) {
    sessionManager.getSessionCookieConfig().setDomain(MasterServerProxySetting.MASTERSERVERPROXY_COOKIE_DOMAIN);
}

We can customized that and use jetty to do that
sessionManager.getSessionCookieConfig().setDomain()


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics