Problem Statement:
If the user has integrated visualizations into Liferay portal using visualize.js. They're able to run reports but they run extremely slow and unreliably. The CORS request keep failing but regular request are successful.
Resolution:
Please follow the below steps to debug this issue:
1. First check if you have OPTIONS as allowed methods, to do that open: <path-to-deployed-jrs>/WEB-INF/applicationContext-security-pro-web.xml and check if <property name="allowedMethods"> contains <value>OPTIONS</value>, it should look like this:
<property name="allowedMethods">
<list>
<value>GET</value>
<value>POST</value>
<value>HEAD</value>
<value>PUT</value>
<value>DELETE</value>
<value>PATCH</value>
<value>OPTIONS</value>
</list>
</property>
2. Both the servers should be either be public or private. Usually, the combination of public/private network communication can be observed in a testing environment but in production that should not be the case. Both domains should be either public or private and issues (failed OPTIONS requests) should not be observed in that case.
3. HTTPS must be enabled on both the server. Enabling HTTP with HTTPS or vice-versa will not work. To enable HTTPS please see:
4. Implement server policy to return Access-Control-Allow-Private-Network: true header as part of each response for selected servers
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now