Add headers on CORS
parent
bf3b082bdf
commit
e409abb265
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue