package yanagishima.filter;

import yanagishima.util.Constants;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class YanagishimaFilter implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        HttpServletResponse res = (HttpServletResponse) response;
        res.setHeader("Access-Control-Request-Headers", Constants.DATASOURCE_HEADER);
        res.setHeader("Access-Control-Allow-Headers", Constants.DATASOURCE_HEADER);
        res.setHeader("Access-Control-Allow-Origin", "*");
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {

    }
}

@@ -568,94 +568,8 @@
 se;%0A
-        res.setHeader(%22Access-Control-Request-Headers%22, Constants.DATASOURCE_HEADER);%0A
     

Remove Access-Control-Request-Headers