@@ -0,0 +1,1148 @@
+package org.vasttrafik.wso2.carbon.common.api.filter;%0D%0A%0D%0Aimport java.io.IOException;%0D%0Aimport javax.ws.rs.container.ContainerRequestContext;%0D%0Aimport javax.ws.rs.container.ContainerResponseContext;%0D%0Aimport javax.ws.rs.container.ContainerResponseFilter;%0D%0Aimport javax.ws.rs.ext.Provider;%0D%0A%0D%0A/**%0D%0A * @author Lars Andersson%0D%0A *%0D%0A */%0D%0A@Provider%0D%0Apublic class DefaultFormatFilter implements ContainerResponseFilter %7B%0D%0A%0D%0A%09@Override%0D%0A%09public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)%0D%0A%09%09%09throws IOException %7B%0D%0A%0D%0A%09%09setResponseHeaders(responseContext);%0D%0A%09%7D%0D%0A%0D%0A%09// TO-DO: Set Content-Length?%0D%0A%09//        Set ETag?%0D%0A%09//        Set Last-Modified?%0D%0A%09private void setResponseHeaders(ContainerResponseContext responseContext) %7B%0D%0A%09%09// Set CORS Headers%0D%0A%09%09responseContext.getHeaders().add(%22Access-Control-Allow-Origin%22, %22*%22);%0D%0A%09%09responseContext.getHeaders().add(%22Access-Control-Allow-Methods%22, %22GET,PUT,POST,DELETE,OPTIONS%22);%0D%0A%09%09responseContext.getHeaders().add(%22Access-Control-Allow-Headers%22, %22Accept,Authorization,Access-Control-Allow-Origin,Content-Length,Content-Type,If-None-Match,If-Modified-Since%22);%0D%0A%09%7D%0D%0A%7D%0D%0A

Add DefaultFormatFilter.java