Hi,
I'm really struggling making CORS working on my environment.
Here is the error I get in the browser:
I am trying to use the Geoserver's REST API to do a few things on the server from Mapstore using the enhanced Axios lib packaged with Mapstore.
I figured I have to add the Geoserver's URL to the UseCORS array in localConfig. I also enabled CORS in the Geoserver Tomcat9 container (uncommented the two part corresponding to Tomcat in web.xml,
according to Geoserver's doc).
Using Curl on CLI, it seems to be OK as it repports Geoserver allowing the Access-Control-Allow-Origin header.
Here is the code related to the Axios request:
var username = 'login';
var password = 'passwd';
var basicAuth = 'Basic ' + btoa(username + ':' + password);
var config = {
headers: {
'Content-Type': 'text/xml',
'Authorization': + basicAuth,
}
};