aboutsummaryrefslogtreecommitdiffstats
path: root/so-monitoring/so-monitoring-handler/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'so-monitoring/so-monitoring-handler/src/main')
-rw-r--r--so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java
index 557e2a63b7..0bcf24dbd8 100644
--- a/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java
+++ b/so-monitoring/so-monitoring-handler/src/main/java/org/onap/so/monitoring/configuration/rest/CorsConfigurer.java
@@ -20,16 +20,12 @@
package org.onap.so.monitoring.configuration.rest;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.core.Ordered;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
-import java.util.concurrent.TimeUnit;
-
/**
* @author waqas.ikram@ericsson, eoin.hanan@ericsson.com
*/
@@ -38,8 +34,8 @@ public class CorsConfigurer {
@Bean
public CorsFilter corsFilter() {
- UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
- CorsConfiguration config = new CorsConfiguration();
+ final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+ final CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.addAllowedOrigin("*");
config.addAllowedHeader("*");