From 8908d48713b627eaa5af9727841ca676f9ddbd98 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 9 Jan 2023 05:05:11 +0300 Subject: Enable CORS on oauth endpoints --- src/main/java/com/juick/config/SecurityConfig.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/com') diff --git a/src/main/java/com/juick/config/SecurityConfig.java b/src/main/java/com/juick/config/SecurityConfig.java index 0b9ec387..bb2a47cb 100644 --- a/src/main/java/com/juick/config/SecurityConfig.java +++ b/src/main/java/com/juick/config/SecurityConfig.java @@ -163,6 +163,7 @@ public class SecurityConfig { .exceptionHandling((exceptions) -> exceptions .authenticationEntryPoint(loginUrlAuthenticationEntryPoint) ) + .cors(cors -> cors.configurationSource(corsConfigurationSource())) // Accept access tokens for User Info and/or Client Registration .oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt); -- cgit v1.2.3