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
|
@ -206,6 +206,7 @@ function asLangSpan(t: Translation, tag = "span"): string {
|
|||
}
|
||||
|
||||
let previousSrc: Set<string> = new Set<string>()
|
||||
|
||||
function generateCsp(
|
||||
layout: LayoutConfig,
|
||||
options: {
|
||||
|
@ -216,6 +217,7 @@ function generateCsp(
|
|||
"'self'",
|
||||
...Constants.defaultOverpassUrls,
|
||||
Constants.countryCoderEndpoint,
|
||||
Constants.nominatimEndpoint,
|
||||
"https://api.openstreetmap.org",
|
||||
"https://pietervdvn.goatcounter.com",
|
||||
].concat(...SpecialVisualizations.specialVisualizations.map((sv) => sv.needsUrls))
|
||||
|
@ -283,6 +285,7 @@ const removeOtherLanguagesHash = crypto
|
|||
.createHash("sha256")
|
||||
.update(removeOtherLanguages)
|
||||
.digest("base64")
|
||||
|
||||
async function createLandingPage(layout: LayoutConfig, manifest, whiteIcons, alreadyWritten) {
|
||||
Locale.language.setData(layout.language[0])
|
||||
const targetLanguage = layout.language[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue