use of com.quorum.tessera.config.CrossDomainConfig in project tessera by ConsenSys.
the class CorsDomainResponseFilterTest method setUp.
@Before
public void setUp() {
CrossDomainConfig crossDomainConfig = new CrossDomainConfig();
crossDomainConfig.setAllowedOrigins(Arrays.asList(SOME_ORIGIN));
domainResponseFilter = new CorsDomainResponseFilter(crossDomainConfig);
requestContext = mock(ContainerRequestContext.class);
responseContext = mock(ContainerResponseContext.class);
}
use of com.quorum.tessera.config.CrossDomainConfig in project tessera by ConsenSys.
the class JerseyServerIT method onSetUp.
@Before
public void onSetUp() throws Exception {
System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
ServerConfig serverConfig = new ServerConfig();
serverConfig.setCommunicationType(CommunicationType.REST);
serverConfig.setServerAddress("http://localhost:8080");
CrossDomainConfig crossDomainConfig = new CrossDomainConfig();
crossDomainConfig.setAllowedOrigins(Arrays.asList("*.acme.com", "*.other.com"));
serverConfig.setCrossDomainConfig(crossDomainConfig);
JaxbUtil.marshalWithNoValidation(serverConfig, System.out);
server = new JerseyServer(serverConfig, SampleApplication.class);
server.start();
}
Aggregations