The whitelist of browser applications set up by Baidu Map developer Center does not work when sending requests using axios

I want to use ide/webservice-geocoding-abroad" rel=" nofollow noreferrer "> reverse geocoding API of Baidu Map, so I sign up for Baidu account and set up an application, as shown below:

clipboard.png

when I use axios to request, I report a cross-domain error

axios.get("http://api.map.baidu.com/geocoder/v2/", {
    params: {
      ak: "", // 
      location: e.point.lat + "," + e.point.lng
    }
}).then(res => {
    console.log(res)
})

Cross-domain error:
Access to XMLHttpRequest at" http://api.map.baidu.com/geoc." from origin" http://test.lalei.com" has been blocked by CORS policy: No "Access-Control-Allow-Origin" header is present on the requested resource.

for security reasons, ak didn"t write it out, ha

Dec.29,2021

use jsonp


Hello. To borrow what you said upstairs, you can refer to the questions you have answered before, which should be able to solve your problem. https://codeshelper.com/q/10.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e57c15-27992.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e57c15-27992.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?