added missing CORS Headers for Test Setup

This commit is contained in:
patrick-werner 2018-06-11 11:09:23 +02:00
parent 6bcddea416
commit c2b2a7eaa7
3 changed files with 10 additions and 7 deletions

View File

@ -4,8 +4,8 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>2.3-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
<version>2.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>hapi-fhir-jaxrs-sse</artifactId>
<build>

View File

@ -132,13 +132,15 @@ public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test {
// Register a CORS filter
CorsConfiguration config = new CorsConfiguration();
CorsInterceptor corsInterceptor = new CorsInterceptor(config);
config.addAllowedHeader("x-fhir-starter");
config.addAllowedHeader("Origin");
config.addAllowedHeader("Accept");
config.addAllowedHeader("X-Requested-With");
config.addAllowedHeader("Content-Type");
config.addAllowedHeader("Access-Control-Request-Method");
config.addAllowedHeader("Access-Control-Request-Headers");
config.addAllowedHeader("Access-Control-Request-Method");
config.addAllowedHeader("Cache-Control");
config.addAllowedHeader("Content-Type");
config.addAllowedHeader("Origin");
config.addAllowedHeader("Prefer");
config.addAllowedHeader("x-fhir-starter");
config.addAllowedHeader("X-Requested-With");
config.addAllowedOrigin("*");
config.addExposedHeader("Location");
config.addExposedHeader("Content-Location");

View File

@ -2154,6 +2154,7 @@
<module>example-projects/hapi-fhir-jpaserver-cds-example</module>
<module>example-projects/hapi-fhir-jpaserver-dynamic</module>
<module>example-projects/hapi-fhir-jpaserver-example-postgres</module>
<module>example-projects/hapi-fhir-jaxrs-sse</module>
<module>tests/hapi-fhir-base-test-mindeps-client</module>
<module>tests/hapi-fhir-base-test-mindeps-server</module>
<module>hapi-fhir-spring-boot</module>