Vote count: 0 When I invoke my service via Angular2 using http.post request, I get Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. My JAX-RS service @Override @POST @Path("/getWsCallReports") @Produces(MediaType.APPLICATION_JSON) public Response getWsCallReports(Query query) { try { LOG.info("getWsCallReports called for " + query); retu Response.status(200) .header("Access-Control-Allow-Origin", "*") .header("Access-Control-Allow-Headers", "origin, content-type, accept, authorization") .header("Access-Control-Allow-Credentials", "true"...
ادامه مطلب