/**
* Set the normal logon ticket without a domain - this works in almost
* all circumstances
*/
Cookie cookie = new Cookie(Constants.LOGON_TICKET, logonTicket);
cookie.setMaxAge(Property.getPropertyInt(new SystemConfigKey("security.session.maxCookieAge")));
cookie.setPath("/");
cookie.setSecure(true);
response.addCookie(cookie);
/**
* Set a logon ticket for the domain - this is require to make active
* dns work.
*/
Cookie cookie2 = new Cookie(Constants.DOMAIN_LOGON_TICKET, logonTicket);
cookie2.setMaxAge(Property.getPropertyInt(new SystemConfigKey("security.session.maxCookieAge")));
cookie2.setPath("/");
// We now set the domain on the cookie so the new Active DNS feature for
// Reverse Proxy works correctly
String host = request.getHeader("Host");
if (host != null) {