Skip to content

Commit cd2f396

Browse files
author
Steve Cody
committed
fixed bug with cookie and multiple base domains
1 parent bb43f04 commit cd2f396

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/od/added/AuthController.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public class AuthController {
9090

9191
@Value("${od.admin.password:admin}")
9292
private String adminPassword;
93+
94+
@Value("${opendashboard.basedomain}")
95+
private String baseDomain;
9396

9497
@CrossOrigin
9598
@RequestMapping(value = "/login", method = RequestMethod.GET, produces = "application/json;charset=utf-8")
@@ -142,7 +145,8 @@ public String login(HttpServletResponse response, HttpServletRequest request, Au
142145
final String jwtToken = jwtTokenUtil.generateToken(claims);
143146

144147
Cookie cookie = new Cookie("securityToken", jwtToken);
145-
148+
cookie.setDomain(baseDomain);
149+
146150
response.addCookie(cookie);
147151
return "OK";
148152
}

0 commit comments

Comments
 (0)