-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Response header Vary
since Spring Security 6.2.0
#15378
Comments
Hi @renetrefft , we also noticed this issue and I believe this is the commit that introduces it. Now CorsFilter is configured by default if CorsConfigurationSource is present. |
I believe this side effect is not intended, as HandlerMappingIntrospector implements CorsConfigurationSource and is instantiated by default by WebMvcConfigurationSupport in spring boot auto configure. |
I agree that this is likely not the intent. It may be best for Spring Security to be more conservative for the time being and pick up only |
Hi @jzheaux I'd like to contribute to this issue. Can I work on it? |
Closed via 3d4bcf1 |
I think this change should be interpreted as a breaking change since, after the update from 3.3.2 to 3.3.3, it is no longer working. FYI @marcusdacoregio, @baezzys and @jzheaux @Configuration
public class CorsWebConfiguration implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/web/**")
.allowedOriginPatterns("https://*.example.com")
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD");
}
} |
After upgrading from Spring Boot 3.1.* to Spring Boot 3.2.0 which includes Spring Security 6.2.0, responses of REST services provided by
@Controller
classes haveVary
headers iforg.springframework.boot:spring-boot-starter-security
is in classpath.Is this intended? We immediately noticed this change since our CDN Akamai does not cache responses with this header.
The text was updated successfully, but these errors were encountered: