Last active
February 16, 2020 09:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CorsFilter implements Filter { | |
public void init(FilterConfig filterConfig) throws ServletException {} | |
public void destroy() {} | |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { | |
HttpServletResponse httpServletResponse = (HttpServletResponse) response; | |
httpServletResponse.setHeader("Access-Control-Allow-Origin", "http://localhost:8088"); | |
chain.doFilter(request, response); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment