forked from MapComplete/MapComplete
Security: add nominatim endpoint to config and csp
This commit is contained in:
parent
477ef56e00
commit
451aa3bcd4
4 changed files with 8 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
import { Utils } from "../../Utils"
|
||||
import { BBox } from "../BBox"
|
||||
import Constants from "../../Models/Constants"
|
||||
|
||||
export interface GeoCodeResult {
|
||||
display_name: string
|
||||
|
@ -15,7 +16,7 @@ export interface GeoCodeResult {
|
|||
}
|
||||
|
||||
export class Geocoding {
|
||||
private static readonly host = "https://nominatim.openstreetmap.org/search?"
|
||||
public static readonly host = Constants.nominatimEndpoint
|
||||
|
||||
static async Search(query: string, bbox: BBox): Promise<GeoCodeResult[]> {
|
||||
const b = bbox ?? BBox.global
|
||||
|
|
|
@ -107,7 +107,7 @@ export default class Constants {
|
|||
public static defaultOverpassUrls = Constants.config.default_overpass_urls
|
||||
public static countryCoderEndpoint: string = Constants.config.country_coder_host
|
||||
public static osmAuthConfig: AuthConfig = Constants.config.oauth_credentials
|
||||
|
||||
public static nominatimEndpoint: string = Constants.config.nominatimEndpoint
|
||||
/**
|
||||
* These are the values that are allowed to use as 'backdrop' icon for a map pin
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue