Merge pull request #602 from elnin0815/patch-2

Added Prefer Header for CORS preflight
This commit is contained in:
James Agnew 2017-03-20 20:35:37 +08:00 committed by GitHub
commit c8a6ca20f5
1 changed files with 1 additions and 0 deletions

View File

@ -154,6 +154,7 @@ public class JpaServerDemo extends RestfulServer {
CorsInterceptor corsInterceptor = new CorsInterceptor(config); CorsInterceptor corsInterceptor = new CorsInterceptor(config);
config.addAllowedHeader("Origin"); config.addAllowedHeader("Origin");
config.addAllowedHeader("Accept"); config.addAllowedHeader("Accept");
config.addAllowedHeader("Prefer");
config.addAllowedHeader("X-Requested-With"); config.addAllowedHeader("X-Requested-With");
config.addAllowedHeader("Content-Type"); config.addAllowedHeader("Content-Type");
config.addAllowedHeader("Access-Control-Request-Method"); config.addAllowedHeader("Access-Control-Request-Method");