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

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

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

Loading…
Cancel
Save