Skip to content

mgocd/spring-boot-333-cors-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An example showing that in Spring Boot 3.3.3 (Spring Security 6.3.3) it is not enough to register a bean of type CorsConfigurationSource to enable CORS, but UrlBasedCorsConfigurationSource is needed.

There are two tests running exactly the same tests, but with different configuration:

  • CorsWithUrlBasedCorsConfigurationSourceTest - @Bean returning UrlBasedCorsConfigurationSource
  • CorsWithCorsConfigurationSourceTest - @Bean returning CorsConfigurationSource

When you run the tests with ./gradlew test you will see the CorsWithCorsConfigurationSourceTest has multiple failures because CORS is not enabled in this scenario.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages