Add headers on CORS

main
Paulo Gustavo Veiga 2024-02-17 19:32:53 -08:00
parent bf3b082bdf
commit e409abb265
2 changed files with 5 additions and 3 deletions

View File

@ -17,8 +17,10 @@ public class WebConfig implements WebMvcConfigurer {
public void addCorsMappings(@NotNull CorsRegistry registry) { public void addCorsMappings(@NotNull CorsRegistry registry) {
if (!corsAllowedOrigins.isEmpty()) { if (!corsAllowedOrigins.isEmpty()) {
registry.addMapping("/api/**") registry.addMapping("/api/**")
.allowedOrigins(corsAllowedOrigins). .exposedHeaders("*")
maxAge(3600); .allowedHeaders("*")
.allowedOrigins(corsAllowedOrigins)
.maxAge(3600);
} }
} }
} }

View File

@ -71,7 +71,7 @@ app:
# Redirect to this url, this url must be configured in the google app {baseurl}/c/registration-google # Redirect to this url, this url must be configured in the google app {baseurl}/c/registration-google
#security.oauth2.google.callbackUrl=<oauth callback url> #security.oauth2.google.callbackUrl=<oauth callback url>
security: security:
corsAllowedOrigins: https://dev.wisemapping.com # corsAllowedOrigins: https://dev.wisemapping.com
oauth2: oauth2:
google: google:
confirmUrl: https://oauth2.googleapis.com/token confirmUrl: https://oauth2.googleapis.com/token