Mercurial > hg > AnnotationManagerN4J
diff src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java @ 91:cf44d9e1a4a7
let CORS be handled by Restlet 2.3 CorsFilter.
author | casties |
---|---|
date | Sun, 08 Feb 2015 18:09:00 +0100 |
parents | b406507a953d |
children | 7268c3ca025b |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java Sun Feb 08 16:57:42 2015 +0100 +++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java Sun Feb 08 18:09:00 2015 +0100 @@ -54,10 +54,6 @@ */ public class AnnotatorAnnotations extends AnnotatorResourceImpl { - protected String getAllowedMethodsForHeader() { - return "OPTIONS,GET,POST,PUT,DELETE"; - } - /** * GET with JSON content-type. * @@ -67,7 +63,6 @@ @Get("json") public Representation doGetJSON(Representation entity) { logger.fine("AnnotatorAnnotations doGetJSON!"); - setCorsHeaders(); // id from URI /annotations/{id} String id = null; String jsonId = (String) getRequest().getAttributes().get("id"); @@ -164,8 +159,6 @@ @Post("json") public Representation doPostJson(Representation entity) { logger.fine("AnnotatorAnnotations doPostJSON!"); - // set headers - setCorsHeaders(); // do authentication TODO: who's allowed to create? Person authUser = getUserFromAuthToken(entity); @@ -219,7 +212,6 @@ @Put("json") public Representation doPutJSON(Representation entity) { logger.fine("AnnotatorAnnotations doPutJSON!"); - setCorsHeaders(); // id from URI /annotations/{id} String jsonId = (String) getRequest().getAttributes().get("id"); String id = decodeJsonId(jsonId); @@ -282,7 +274,6 @@ @Delete("json") public Representation doDeleteJSON(Representation entity) { logger.fine("AnnotatorAnnotations doDeleteJSON!"); - setCorsHeaders(); // id from URI /annotations/{id} String jsonId = (String) getRequest().getAttributes().get("id"); String id = decodeJsonId(jsonId);