From 9498247082746d1146116185c84023595544b8e1 Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Mon, 4 Jun 2018 16:12:31 +0200 Subject: [PATCH] Allows the Cache-Control Header in CORS header for jpa-example-server & CLI --- .../src/main/java/ca/uhn/fhir/rest/api/Constants.java | 1 + hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java index 0ab538b8225..63d2e0386c6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java @@ -274,6 +274,7 @@ public class Constants { corsAllowedHeaders.add("Content-Type"); corsAllowedHeaders.add("Origin"); corsAllowedHeaders.add("Prefer"); + corsAllowedHeaders.add("X-FHIR-Starter"); corsAllowedHeaders.add("X-Requested-With"); CORS_ALLOWED_HEADERS = Collections.unmodifiableSet(corsAllowedHeaders); diff --git a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml b/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml index 4bba1d9adc6..a09387d37ea 100644 --- a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml +++ b/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml @@ -76,7 +76,7 @@ A comma separated list of allowed headers when making a non simple CORS request. cors.allowed.headers - X-FHIR-Starter,Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Prefer + Accept,Access-Control-Request-Headers,Access-Control-Request-Method,Cache-Control,Content-Type,Origin,Prefer,X-FHIR-Starter,X-Requested-With A comma separated list non-standard response headers that will be exposed to XHR2 object.