|
|
@ -60,6 +60,7 @@ import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.core.annotation.Order;
|
|
|
|
import org.springframework.core.annotation.Order;
|
|
|
|
import org.springframework.core.env.Environment;
|
|
|
|
import org.springframework.core.env.Environment;
|
|
|
|
|
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
|
import org.springframework.http.HttpMethod;
|
|
|
|
import org.springframework.http.HttpMethod;
|
|
|
|
import org.springframework.security.config.annotation.web.WebSecurityConfigurer;
|
|
|
|
import org.springframework.security.config.annotation.web.WebSecurityConfigurer;
|
|
|
|
import org.springframework.security.config.annotation.web.builders.WebSecurity;
|
|
|
|
import org.springframework.security.config.annotation.web.builders.WebSecurity;
|
|
|
@ -147,7 +148,8 @@ public class CloudFoundryActuatorAutoConfiguration {
|
|
|
|
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
|
|
|
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
|
|
|
corsConfiguration.addAllowedOrigin(CorsConfiguration.ALL);
|
|
|
|
corsConfiguration.addAllowedOrigin(CorsConfiguration.ALL);
|
|
|
|
corsConfiguration.setAllowedMethods(Arrays.asList(HttpMethod.GET.name(), HttpMethod.POST.name()));
|
|
|
|
corsConfiguration.setAllowedMethods(Arrays.asList(HttpMethod.GET.name(), HttpMethod.POST.name()));
|
|
|
|
corsConfiguration.setAllowedHeaders(Arrays.asList("Authorization", "X-Cf-App-Instance", "Content-Type"));
|
|
|
|
corsConfiguration.setAllowedHeaders(
|
|
|
|
|
|
|
|
Arrays.asList(HttpHeaders.AUTHORIZATION, "X-Cf-App-Instance", HttpHeaders.CONTENT_TYPE));
|
|
|
|
return corsConfiguration;
|
|
|
|
return corsConfiguration;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|