headers 'Access-Control-Allow-Origin' '' headers 'Access-Control-Allow-Methods' 'POST, PUT, DELETE. Same headers should be set for any backend server. On the site, they show you a request header of x-originating-ip so i have tried that where access-control-allow-origin is. I m not sure if datatype is working properly as its actually xml being returned, but i tried that too. For example if your backend server is in Ruby on rails, use following code before sending back response. You will notice that i do not have data set. ![]() Observer.observe(document.getElementById('divmap'), observerConfig) ĭoes any one know how to solve this problem, any instruction is highly appreciated, thanks a lot. You need to set cors header on server side where you are requesting data from. If this header is not present in the response headers, it means that CORS has not been set up on the server. The value of this header consists of origins that are allowed to access the resources. Start observing the target node (divmap) and the specified configuration The Access-Control-Allow-Origin response header is perhaps the most important HTTP header set by the CORS mechanism. Var observer = new MutationObserver(handleMutations) Create a new MutationObserver with the callback function $(mutation.addedNodes).filter('img').attr("crossorigin", "true") CORS header ‘Access-Control-Allow-Origin’ missing'. ![]() So I use following codes to catch event before image loading data, but it is still invalid. ![]() The Error message show Īnd I found the image element not insert into map object, it is reject when fetching then throw the error.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |