|
@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequestWrapper;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import org.apache.tomcat.util.http.LegacyCookieProcessor;
|
|
|
import org.maxkey.authn.AbstractAuthenticationProvider;
|
|
|
import org.maxkey.authn.LoginCredential;
|
|
|
import org.maxkey.authn.SavedRequestAwareAuthenticationSuccessHandler;
|
|
@@ -45,6 +46,9 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
+import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
|
|
+import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
|
|
+import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.security.core.Authentication;
|
|
|
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
|
|
|
import org.springframework.security.web.savedrequest.RequestCache;
|
|
@@ -312,4 +316,11 @@ public class PermissionAdapter implements AsyncHandlerInterceptor {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Bean
|
|
|
+ public WebServerFactoryCustomizer<TomcatServletWebServerFactory> cookieProcessorCustomizer() {
|
|
|
+ return (factory) -> factory.addContextCustomizers(
|
|
|
+ (context) -> context.setCookieProcessor(new LegacyCookieProcessor()));
|
|
|
+ }
|
|
|
}
|
|
|
+
|