Skip to content

Commit

Permalink
Skip proxy and update map search URL (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
annavik authored Aug 23, 2023
1 parent 0c2515b commit 62b06af
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
8 changes: 0 additions & 8 deletions ui/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ status = 200
force = true
headers = { X-From = "Netlify" }

[[redirects]]
# Proxy /nominatim/ requests to Nominatim API (used for OSM search)
from = "/nominatim/"
to = "https://nominatim.openstreetmap.org/search/"
status = 200
force = true
headers = { X-From = "Netlify" }

[[redirects]]
# Redirect root to overview page
from = "/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import _ from 'lodash'
import { useEffect, useState } from 'react'
import { SearchResult, ServerSearchResult } from './types'

const API_URL = '/nominatim'
const API_URL = 'https://nominatim.openstreetmap.org/search'
const MAX_NUM_RESULTS = 5

const convertServerResult = (result: ServerSearchResult): SearchResult => {
Expand Down
7 changes: 0 additions & 7 deletions ui/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,4 @@ module.exports = function (app) {
changeOrigin: true,
})
)
app.use(
'/nominatim',
createProxyMiddleware({
target: 'https://nominatim.openstreetmap.org/search',
changeOrigin: true,
})
)
}

0 comments on commit 62b06af

Please sign in to comment.