Allow CORS on the public server

This commit is contained in:
James Agnew 2017-07-12 13:47:30 -04:00
parent 65cc41e376
commit 905d1239a0
2 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ public class ServletExamples {
config.addExposedHeader("Location"); config.addExposedHeader("Location");
config.addExposedHeader("Content-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 // Create the interceptor and register it
CorsInterceptor interceptor = new CorsInterceptor(config); CorsInterceptor interceptor = new CorsInterceptor(config);

View File

@ -190,7 +190,7 @@ public class TestRestfulServer extends RestfulServer {
config.addAllowedOrigin("*"); config.addAllowedOrigin("*");
config.addExposedHeader("Location"); config.addExposedHeader("Location");
config.addExposedHeader("Content-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); registerInterceptor(corsInterceptor);
/* /*