@@ -0,0 +1,1179 @@
+package pl.mycalories;%0D%0A%0D%0Aimport org.springframework.stereotype.Component;%0D%0A%0D%0Aimport javax.servlet.*;%0D%0Aimport javax.servlet.http.HttpServletRequest;%0D%0Aimport javax.servlet.http.HttpServletResponse;%0D%0Aimport java.io.IOException;%0D%0A%0D%0A@Component%0D%0Apublic class CorsFilter implements Filter %7B%0D%0A    %0D%0A    @Override%0D%0A    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException %7B%0D%0A%0D%0A        HttpServletRequest request = (HttpServletRequest) req;%0D%0A        HttpServletResponse response = (HttpServletResponse) res;%0D%0A%0D%0A        response.setHeader(%22Access-Control-Allow-Origin%22, request.getHeader(%22Origin%22));%0D%0A        response.setHeader(%22Access-Control-Allow-Credentials%22, %22true%22);%0D%0A        response.setHeader(%22Access-Control-Allow-Methods%22, %22POST, GET, OPTIONS, DELETE, PUT%22);%0D%0A        response.setHeader(%22Access-Control-Max-Age%22, %223600%22);%0D%0A        response.setHeader(%22Access-Control-Allow-Headers%22, %22Content-Type, Accept, X-Requested-With, remember-me%22);%0D%0A%0D%0A        chain.doFilter(req, res);%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public void init(FilterConfig filterConfig) %7B%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public void destroy() %7B%0D%0A    %7D%0D%0A%7D%0D%0A

implement CORS support