
org.ikasan.dashboard.security.CustomRequestCache Maven / Gradle / Ivy
The newest version!
package org.ikasan.dashboard.security;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
/**
* HttpSessionRequestCache that avoids saving internal framework requests.
*/
public class CustomRequestCache extends HttpSessionRequestCache
{
/**
* {@inheritDoc}
*
* If the method is considered an internal request from the framework, we skip
* saving it.
*
* @see SecurityUtils#isFrameworkInternalRequest(HttpServletRequest)
*/
@Override
public void saveRequest(HttpServletRequest request, HttpServletResponse response)
{
if (!SecurityUtils.isFrameworkInternalRequest(request)) {
super.saveRequest(request, response);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy