Vaadin ‘continue’ URL参数

huangapple go评论62阅读模式
英文:

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();
}

Link: https://stackoverflow.com/questions/75222930/spring-boot-3-0-2-adds-continue-query-parameter-to-request-url-after-login

英文:

I found a solution. As described above it comes form Springs HttpSessionRequestCache. It is a performance optimization feature and could be removed

https://stackoverflow.com/questions/75222930/spring-boot-3-0-2-adds-continue-query-parameter-to-request-url-after-login

@Bean
SecurityFilterChain springSecurity(HttpSecurity http) throws Exception {
    HttpSessionRequestCache requestCache = new HttpSessionRequestCache();
    requestCache.setMatchingRequestParameterName(null);
    http
        // ...
        .requestCache((cache) -> cache
            .requestCache(requestCache)
        );
    return http.build();
}

huangapple
  • 本文由 发表于 2023年4月20日 05:57:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/76059106.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定