Details
-
Bug
-
Resolution: Duplicate
-
Blocker
-
None
-
7.1
-
Unknown
-
N/A
-
N/A
-
Description
Actually XWIKI-11300 strikes again (see screenshot) on xwiki.org.
From what I see, the CORS policy is not applied on the webjar resources (I don't see "Access-Control-Allow-Origin" in the HTTP headers).
It seems it has been caused by XWIKI-10881.
Some errors I see:
<filter-mapping>
<filter-name>Set CORS policy for fonts</filter-name>
<url-pattern>/bin/webjars/*</url-pattern>
</filter-mapping>
The URL patten has not been updated. It should be /webjars/* (without the /bin part).
Moreover, it seems we should add
<dispatcher>FORWARD</dispatcher>
to this filter, according to
https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-7.1/xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-servlet/src/main/java/org/xwiki/resource/servlet/RoutingFilter.java#L150
this.servletContext.getNamedDispatcher("resourceReferenceHandler").forward(request, response);
But tested on xwiki.org, it actually does not solve the issue.
Anyway, setting the CORS policy with a filter at web.xml was a temporary solution. Now that we have XWIKI-10881, we might want to implement a filter with the XWiki components.
Attachments
Issue Links
- duplicates
-
XWIKI-12251 The CORS Filter is not executed after a ResourceReferenceHandler
- Closed