Is it possible to apply cross-origin resource sharing (CORS) in a Websphere Application Server Liberty Profile V8.5 ?
I searched the redbook but couldn\'t find IBM menti
For those who is looking for a workaround while using IBM Websphere Application Server and looking for an answer to apply CORS. (You should do this programmatically ) I know the op is looking for an answer without using java code or else... This might be helpfull to somebody else.. Write a filter that lets you to set response headers programmatically. Such as :
public class YourFilter implements javax.servlet.Filter{
@Override
public void doFilter(ServletRequest request,ServletResponse servletResponse , FilterChain chain) throws IOException, ServletException {
HttpServletResponse response = (HttpServletResponse ) servletResponse ;
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Access-Control-Allow-Headers","Access-Control-Allow-Origin, X-Requested-With", bla,bla...);
}
}