blocked by CORS policy: Response to preflight

blocked by CORS policy: Response to preflight, necesito llamar a un proceso de bpm desde una aplicacion externa, pero al llamarlo http://"localhost"/bonita/API/bpm/process/8191801336879498925/instantiation me aparece en consola este error: " Access to XMLHttpRequest at 'http://"localghost"/bonita/API/bpm/process/8191801336879498925/instantiation' from origin 'http://"appExterna"' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.", he configurado el web.xml de bonita y de tomcat, no se que mas necesite,!

So you solve this question by using the documentation https://documentation.bonitasoft.com/bonita/7.10/enable-cors-in-tomcat-bundle?

If yes, maybe you can resolve this subject to make it available for the community, and open another one for the second question?

hello, 

is it possible to see the web.xml of the bonita.war?

did you follow this doc https://documentation.bonitasoft.com/bonita/7.10/enable-cors-in-tomcat-bundle?

Muchas gracias! lo he resuelto! con el bonita,war ( habiltando los cors para cualquier url externa! ), ahora tengo otra duda amigo! estoy intentando crear un usuario en bonita desde ajax post y me da un 403...Disculpa las molestias por hacer tantas preguntas jajjaja de igual forma muchas gracias

var dataForm = {};
                            dataForm.userName = "fab";
                            dataForm.password = "fab";
                            dataForm.password_confirm = "fab";
                            dataForm.icon = "";
                            dataForm.firstname = "fa";
                            dataForm.lastname = "fa";
                            dataForm.title = "Manager";
                            dataForm.job_title = "Manager";
                            dataForm.manager_id = "22";
            
                                var createUser = {
                                    "url": "http://localhost/bonita/API/identity/user/",
                                    "method": "POST",
                                    "dataType": "json",
                                    "data": JSON.stringify(dataForm),
                                    "contentType": "application/json",
                                    "headers": {
                                        'X-Bonita-API-Token': apiToken
                                    },
                                    xhrFields: {
                                        withCredentials: true
                                    },
                                    "timeout": 0,
                                };

                            $.ajax(createUser).done(function(response) {
                                console.log(response);
                            });

Are you logged in with a user that have an Admin profile?

Also did you have a "JSESSIONID" cookie (see https://documentation.bonitasoft.com/bonita/7.10/rest-api-authentication)

If yes, maybe you have a probleme with JQuery that do not send your session cookies.

(see https://stackoverflow.com/questions/2870371/why-is-jquerys-ajax-method-not-sending-my-session-cookie)