Problem

You configured a direct connection of WProofreader with AppServer (as described Option A: Binding of Static Files and Serving Service Requests by AppServer) on the server with Apache Tomcat. Your application and WProofreader static files are located in different domains, for example, domain_name1.com and domain_name2.com and there is a CORS error in the console.  

Below is an example of such an error:

Access to font at 'http://domain_name1/wscservice/wscbundle/themes/fonts/opensans_bold/.../font_name.ttf' from origin 'http://domain_name2/' has been blocked  by CORS policy: No 'Access-Control-Allow-Origin' header is present on the request resource.

Solution

To solve this issue, add the Access-Control-Allow-Headers to enable cross-origin requests to the Apache Tomcat settings (/conf/web.xml file). It should be Apache Tomcat that is used for processing of the WebSpellChecker static files.

  1. For detailed instructions, refer to the CORS filter description. Note that the description varies depending on the Apache Tomcat version used.
  2. After adding the CORS filer with allowed origins, restart your Apache Tomcat.

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.


Related issues