英文:
Vaadin 'continue' url parameter
问题
Vaadin有时会在URL中添加'continue'参数,例如:
重定向到https://example.com/profile?continue&continue&continue&continue
这是什么意思?是否可以禁用这种行为?
英文:
I noticed that sometimes Vaadin adds 'continue' parameter to the url, for example:
Redirecting to https://example.com/profile?continue&continue&continue&continue
What does this mean? And is it possible to disable such behavior?
答案1
得分: 2
I found a solution. As described above it comes from Springs HttpSessionRequestCache. It is a performance optimization feature and could be removed.
@Bean
SecurityFilterChain springSecurity(HttpSecurity http) throws Exception {
    HttpSessionRequestCache requestCache = new HttpSessionRequestCache();
    requestCache.setMatchingRequestParameterName(null);
    http
        // ...
        .requestCache((cache) -> cache
            .requestCache(requestCache)
        );
    return http.build();
}
英文:
I found a solution. As described above it comes form Springs HttpSessionRequestCache. It is a performance optimization feature and could be removed
@Bean
SecurityFilterChain springSecurity(HttpSecurity http) throws Exception {
    HttpSessionRequestCache requestCache = new HttpSessionRequestCache();
    requestCache.setMatchingRequestParameterName(null);
    http
        // ...
        .requestCache((cache) -> cache
            .requestCache(requestCache)
        );
    return http.build();
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论