@@ -0,0 +1,1536 @@
+/*%0A * This file is part of COMPASS. It is subject to the license terms in%0A * the LICENSE file found in the top-level directory of this distribution.%0A * (Also available at http://www.apache.org/licenses/LICENSE-2.0.txt)%0A * You may not use this file except in compliance with the License.%0A */%0A/*%0A * This file is part of ATLAS. It is subject to the license terms in%0A * the LICENSE file found in the top-level directory of this distribution.%0A * (Also available at http://www.apache.org/licenses/LICENSE-2.0.txt)%0A * You may not use this file except in compliance with the License.%0A */%0Apackage de.dfki.asr.atlas.rest.providers;%0A%0Aimport java.io.IOException;%0Aimport javax.ws.rs.container.ContainerRequestContext;%0Aimport javax.ws.rs.container.ContainerResponseContext;%0Aimport javax.ws.rs.container.ContainerResponseFilter;%0Aimport javax.ws.rs.core.MultivaluedMap;%0Aimport javax.ws.rs.ext.Provider;%0A%0A@Provider%0Apublic class CORSRequestFilter implements ContainerResponseFilter %7B%0A%0A%09@Override%0A%09public void filter(final ContainerRequestContext requestContext, final ContainerResponseContext responseContext) throws IOException %7B%0A%09%09MultivaluedMap%3CString, Object%3E headers = responseContext.getHeaders();%0A%09%09headers.add(%22Access-Control-Allow-Origin%22, %22*%22);%0A%09%09headers.add(%22Access-Control-Allow-Headers%22, %22origin, content-type, accept, authorization%22);%0A%09%09headers.add(%22Access-Control-Allow-Credentials%22, %22true%22);%0A%09%09headers.add(%22Access-Control-Allow-Methods%22, %22GET, POST, PUT, DELETE, OPTIONS, HEAD%22);%0A%09%09headers.add(%22Access-Control-Max-Age%22, %221209600%22);%0A%09%7D%0A%0A%7D%0A

Add Cross Origin Request Filter