Permalink
Browse files

Add and expand more "Access-Control-Allow-*" headers.

  • Loading branch information...
shsu committed Feb 24, 2014
1 parent b83dfe1 commit 2e8f0078ba22f666bd023c7656e604a411ea8878
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/ca/bcit/infosys/comp4911/helper/SH.java
@@ -14,15 +14,15 @@
public static javax.ws.rs.core.Response corsResponse(Integer code) {
return javax.ws.rs.core.Response.status(code).
- header("Access-Control-Allow-Origin", "*").
- header("Access-Control-Allow-Methods","GET, POST, PUT, DELETE").
- header("Access-Control-Allow-Headers","x-requested-with").
+ header("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS, X-XSRF-TOKEN").
+ header("Access-Control-Max-Age",3600).
build();
}
public static javax.ws.rs.core.Response corsResponseWithEntity(Integer code, Object entity) {
return javax.ws.rs.core.Response.status(code).entity(entity).
- header("Access-Control-Allow-Methods","GET, POST, PUT, DELETE").
+ header("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS, X-XSRF-TOKEN").
+ header("Access-Control-Max-Age",3600).
build();
}

0 comments on commit 2e8f007

Please sign in to comment.