getaddress: send User-Agent to Nominatim
This commit is contained in:
@@ -33,7 +33,11 @@ export const getAddress = async (params) => {
|
||||
let coord = props.location[0].loc.coordinates
|
||||
let url = NOMINATIM_URL.replace('xx', coord[1]).replace('yy', coord[0])
|
||||
try {
|
||||
const response = await axios(encodeURI(url));
|
||||
const response = await axios(encodeURI(url),{
|
||||
headers: {
|
||||
'User-Agent': 'Firefox 132.0.1'
|
||||
}
|
||||
});
|
||||
if (response.status !== 200) {
|
||||
return returnOnError(ret, 'RESPSTATUS', getAddress.name, response.status)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user