package com.github.jhpoelen.fbob;

import java.io.IOException;

import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.core.MultivaluedMap;

public class CORSResponseFilter implements ContainerResponseFilter {

    public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)
            throws IOException {

        MultivaluedMap<String, Object> headers = responseContext.getHeaders();

        headers.add("Access-Control-Allow-Origin", "*");
    }

}


@@ -607,16 +607,95 @@
 , %22*%22);%0A
+        headers.add(%22Access-Control-Allow-Methods%22, %22GET, POST, DELETE, PUT%22);%0A
     %7D%0A%0A%7D

add methods for CORS