I have a simple dashboard which is served by the the workflow HTTP Server Input using this url:
http://localhost:8080/printmanager
Now within my Connect web template, I need to log into the Connect Server via an ajax call using:
http://localhost:9340/rest/serverengine/authentication/login
This used to work fine in Connect v2020.1.
We have now upgraded to Connect v2021.1 and we are getting the following error in the browser which indicates that Objectif Lune have changed the CORS policy in the latest version of the Connect Server:
Access to XMLHttpRequest at ‘http://localhost:9340/rest/serverengine/authentication/login’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: It does not have HTTP ok status.
Access to XMLHttpRequest at ‘http://localhost:9340/rest/serverengine/entity/find’ from origin ‘http://localhost:8080’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: It does not have HTTP ok status.
The Network.XHR tab shows:
/login:
/find:
Does the new version expect specific headers in the ajax request?
How can I resolve this problem?