Skip to content

Commit cd89b24

Browse files
committed
Fix: Add CORS again, but allow all origins
1 parent fa3f2f1 commit cd89b24

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/main/kotlin/com/salt/developerjokes/api/JokeController.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import java.net.URI
1111

1212
@RestController
1313
@RequestMapping("/api/jokes")
14+
@CrossOrigin(origins = ["*"])
1415
class JokeController(@Autowired val service: JokeService) {
1516

1617
@GetMapping

src/main/kotlin/com/salt/developerjokes/api/SecurityConfig.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class SecurityConfig {
2929
@Bean
3030
fun defaultSecurityFilterChain(http: HttpSecurity): SecurityFilterChain {
3131
return http.csrf().disable()
32-
.cors().disable()
3332
.authorizeHttpRequests()
3433
.requestMatchers("/login").permitAll()
3534
.requestMatchers(HttpMethod.HEAD, "/**").permitAll()

0 commit comments

Comments
 (0)