Permalink
Browse files

Enable CORS on CombinedResourceHandler.

  • Loading branch information...
BalusC committed May 2, 2016
1 parent ebd78a7 commit f773bb6a0d201ac475d6f10d3d7661ca5fdf0def
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/main/java/org/omnifaces/resourcehandler/CombinedResourceHandler.java
@@ -580,6 +580,10 @@ private void create(FacesContext context, String rendererType) {
componentResource.getAttributes().put("library", LIBRARY_NAME);
componentResource.getAttributes().put("name", infoBuilder.create() + extension);
componentResource.setRendererType(rendererType);
if (rendererType == RENDERER_TYPE_JS) {
componentResource.getPassThroughAttributes().put("crossorigin", "anonymous");
}
}
removeComponentResources(context, componentResourcesToRemove, target);

0 comments on commit f773bb6

Please sign in to comment.