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.
- For detailed instructions, refer to the CORS filter description. Note that the description varies depending on the Apache Tomcat version used.
- After adding the CORS filer with allowed origins, restart your Apache Tomcat.
Related articles