Vaadin '继续' url 参数

问题描述 投票:0回答:1

我注意到有时 Vaadin 会在 url 中添加“继续”参数,例如:

重定向至 https://example.com/profile?继续&继续&继续&继续

这是什么意思?是否可以禁用这种行为?

vaadin vaadin-flow vaadin24
1个回答
0
投票

我找到了解决办法。如上所述,它来自 Springs HttpSessionRequestCache。这是一项性能优化功能,可以删除

Spring Boot 3.0.2 登录后请求 URL 添加“继续”查询参数

@Bean
SecurityFilterChain springSecurity(HttpSecurity http) throws Exception {
    HttpSessionRequestCache requestCache = new HttpSessionRequestCache();
    requestCache.setMatchingRequestParameterName(null);
    http
        // ...
        .requestCache((cache) -> cache
            .requestCache(requestCache)
        );
    return http.build();
}
© www.soinside.com 2019 - 2024. All rights reserved.