Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session fetched for static assets #171

Open
markosski opened this issue May 10, 2024 · 1 comment
Open

Session fetched for static assets #171

markosski opened this issue May 10, 2024 · 1 comment

Comments

@markosski
Copy link

markosski commented May 10, 2024

Issue description

Hello all! I noticed that some static assets get the session cookie returned in response. I have a custom implementation of session storage that stores data in database (instead of in-memory) and this behavior adds unnecessary load onto the database. I tested with default in memory session storage and the behavior is the same.
Not sure if this is configuration issue or possibly a bug?

image image image
@markosski
Copy link
Author

Looking through the code HttpSessionFilter execute on each request. I created the following to override this. Is this reasonable?

@Filter(patternStyle = FilterPatternStyle.REGEX, patterns = "(?!\\/static\\/).+")
@Replaces(HttpSessionFilter.class)
public class SessionFilter extends HttpSessionFilter {
    public SessionFilter(SessionStore<Session> sessionStore, HttpSessionIdResolver[] resolvers, HttpSessionIdEncoder[] encoders) {
        super(sessionStore, resolvers, encoders);
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant