From 905d1239a01d18dfe0832d05daf29c05786d0d80 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Wed, 12 Jul 2017 13:47:30 -0400 Subject: [PATCH] Allow CORS on the public server --- examples/src/main/java/example/ServletExamples.java | 2 +- .../src/main/java/ca/uhn/fhirtest/TestRestfulServer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/src/main/java/example/ServletExamples.java b/examples/src/main/java/example/ServletExamples.java index 95b52bda27e..40fe909ed2f 100644 --- a/examples/src/main/java/example/ServletExamples.java +++ b/examples/src/main/java/example/ServletExamples.java @@ -141,7 +141,7 @@ public class ServletExamples { config.addExposedHeader("Location"); config.addExposedHeader("Content-Location"); - config.setAllowedMethods(Arrays.asList("GET","POST","PUT","DELETE","OPTIONS")); + config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH")); // Create the interceptor and register it CorsInterceptor interceptor = new CorsInterceptor(config); diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java index f11c9e641de..c385b0e61b4 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/TestRestfulServer.java @@ -190,7 +190,7 @@ public class TestRestfulServer extends RestfulServer { config.addAllowedOrigin("*"); config.addExposedHeader("Location"); config.addExposedHeader("Content-Location"); - config.setAllowedMethods(Arrays.asList("GET","POST","PUT","DELETE","OPTIONS")); + config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH")); registerInterceptor(corsInterceptor); /*