use of javax.ws.rs.OPTIONS in project stanbol by apache.
the class ReferencedSiteRootResource method handleCorsPreflightEntity.
@OPTIONS
@Path("/entity")
public Response handleCorsPreflightEntity(@PathParam(value = "site") String siteId, @Context HttpHeaders headers) {
Site site = getSite(siteId);
ResponseBuilder res = Response.ok();
if (site instanceof ManagedSite) {
//enableCORS(servletContext, res, headers, OPTIONS,GET,POST,PUT,DELETE);
} else {
//enableCORS(servletContext, res, headers,OPTIONS,GET);
}
return res.build();
}
Aggregations