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) {
if (!corsAllowedOrigins.isEmpty()) {
registry.addMapping("/api/**")
.allowedOrigins(corsAllowedOrigins).
maxAge(3600);
.exposedHeaders("*")
.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
#security.oauth2.google.callbackUrl=<oauth callback url>
security:
corsAllowedOrigins: https://dev.wisemapping.com
# corsAllowedOrigins: https://dev.wisemapping.com
oauth2:
google:
confirmUrl: https://oauth2.googleapis.com/token