Ignore:
Timestamp:
Feb 8, 2015, 5:09:00 PM (9 years ago)
Author:
casties
Branch:
default
Children:
92:aadf8760216d, 94:fcb6fe10e08c
Message:

let CORS be handled by Restlet 2.3 CorsFilter?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java

    r88 r91  
    5555public class AnnotatorAnnotations extends AnnotatorResourceImpl {
    5656
    57     protected String getAllowedMethodsForHeader() {
    58         return "OPTIONS,GET,POST,PUT,DELETE";
    59     }
    60 
    6157    /**
    6258     * GET with JSON content-type.
     
    6864    public Representation doGetJSON(Representation entity) {
    6965        logger.fine("AnnotatorAnnotations doGetJSON!");
    70         setCorsHeaders();
    7166        // id from URI /annotations/{id}
    7267        String id = null;
     
    165160    public Representation doPostJson(Representation entity) {
    166161        logger.fine("AnnotatorAnnotations doPostJSON!");
    167         // set headers
    168         setCorsHeaders();
    169162
    170163        // do authentication TODO: who's allowed to create?
     
    220213    public Representation doPutJSON(Representation entity) {
    221214        logger.fine("AnnotatorAnnotations doPutJSON!");
    222         setCorsHeaders();
    223215        // id from URI /annotations/{id}
    224216        String jsonId = (String) getRequest().getAttributes().get("id");
     
    283275    public Representation doDeleteJSON(Representation entity) {
    284276        logger.fine("AnnotatorAnnotations doDeleteJSON!");
    285         setCorsHeaders();
    286277        // id from URI /annotations/{id}
    287278        String jsonId = (String) getRequest().getAttributes().get("id");
Note: See TracChangeset for help on using the changeset viewer.