|
|
@@ -22,6 +22,10 @@ public class TokenFilter implements Filter {
|
|
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
|
|
throws IOException, ServletException {
|
|
|
String userId = ServletUtil.getHeader("x-user-id");
|
|
|
+ if (userId == null) {
|
|
|
+ userId = "-1";
|
|
|
+ }
|
|
|
+
|
|
|
String loginId = ServletUtil.getHeader("x-login-id");
|
|
|
LoginUser loginUser = new LoginUser(Long.parseLong(userId));
|
|
|
try (UserContext context = new UserContext(loginUser)) {
|