summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-widget-ms/widget-ms/src/main/java/org/onap/portalapp/widget/filters/CorsConfiguration.java
blob: 5338359f36838fd603cb2141763aaa6e25fef634 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package org.onap.portalapp.widget.filters;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

@Configuration
public class CorsConfiguration extends WebSecurityConfigurerAdapter {
	@Override
	protected void configure(HttpSecurity http) throws Exception {
		http.authorizeRequests().antMatchers(HttpMethod.OPTIONS, "/microservices/widgetCatalog/").permitAll();
		http.csrf().disable();
	}	
}