fix: 通过key调用系统后清理session

This commit is contained in:
CaptainB 2022-06-26 09:07:36 +08:00 committed by 刘瑞斌
parent c6cb4025c6
commit 922cc96cb0
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ public class ApiKeyFilter extends AnonymousFilter {
@Override
protected void postHandle(ServletRequest request, ServletResponse response) throws Exception {
if (SecurityUtils.getSubject().isAuthenticated()) {
if (ApiKeyHandler.isApiKeyCall(WebUtils.toHttp(request)) && SecurityUtils.getSubject().isAuthenticated()) {
SecurityUtils.getSubject().logout();
}
}