Security: add nominatim endpoint to config and csp

This commit is contained in:
Pieter Vander Vennet 2023-09-29 11:13:30 +02:00
parent 477ef56e00
commit 451aa3bcd4
4 changed files with 8 additions and 3 deletions

View file

@ -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