java - Restlet 1.1 Access Control Header Issue -
i'm working on restlet built on restlet 1.1.1 the issue i'm facing setting 'access-control-allow-origin' header allow cross domain requests. i've attempted few things didn't work. method one, put header in acceptrepresentation function: @override public void acceptrepresentation( representation resetentity ) { form headers = (form)getresponse().getattributes().get("org.restlet.http.headers"); if (headers == null) { headers = new form(); getresponse().getattributes().put("org.restlet.http.headers", headers); } headers.add("access-control-allow-origin","https://origin.server.edu"); //other code here actual resource logic... } this didn't work. still received errors when attempting send request using jquery such: jquery.ajax({ type: "post", contenttype: "application/json", url: "https://test.servername.edu/cas/cas-rest-api/reset/...