Skip to content

Commit d0e138f

Browse files
committed
Allow all with CORS.
Just want to see any kind of CORS header
1 parent be24b00 commit d0e138f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/main/kotlin/net/osable/core/SecurityConfiguration.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import org.springframework.security.web.authentication.SimpleUrlAuthenticationFa
1313
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler
1414
import org.springframework.security.web.csrf.CookieCsrfTokenRepository
1515
import org.springframework.web.bind.annotation.RestController
16+
import org.springframework.web.cors.CorsConfiguration
17+
import org.springframework.web.cors.UrlBasedCorsConfigurationSource
1618

1719
@Configuration
1820
class SecurityConfiguration {
@@ -43,6 +45,10 @@ class SecurityConfiguration {
4345
accessDeniedException.printStackTrace()
4446
}
4547

48+
http.cors().configurationSource {
49+
CorsConfiguration().applyPermitDefaultValues()
50+
}
51+
4652
return http.build()
4753
}
4854

0 commit comments

Comments
 (0)