nili 10 months ago
parent
commit
d80fa675f9
  1. 8
      game-web/src/main/java/awesome/group/filter/AdminLoginFilter.java

8
game-web/src/main/java/awesome/group/filter/AdminLoginFilter.java

@ -33,9 +33,11 @@ public class AdminLoginFilter implements Filter {
try { try {
HttpServletRequest httpRequest = (HttpServletRequest) request; HttpServletRequest httpRequest = (HttpServletRequest) request;
String token = ""; String token = "";
for (Cookie c : httpRequest.getCookies()) { if(httpRequest.getCookies() != null) {
if (c.getName().equals("MatrixToken")) { for (Cookie c : httpRequest.getCookies()) {
token = c.getValue(); if (c.getName().equals("MatrixToken")) {
token = c.getValue();
}
} }
} }
List<String> openApi = List.of( List<String> openApi = List.of(

Loading…
Cancel
Save