X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d97ca9fcb2ae54080d6b92c7e85ff111308bc1cc..7c869701f02369873c5573236398ec885c4a951f:/nominatim/api/v1/server_glue.py diff --git a/nominatim/api/v1/server_glue.py b/nominatim/api/v1/server_glue.py index d83adaae..d1bcc1da 100644 --- a/nominatim/api/v1/server_glue.py +++ b/nominatim/api/v1/server_glue.py @@ -69,6 +69,11 @@ class ASGIAdaptor(abc.ABC): body of the response to 'output'. """ + @abc.abstractmethod + def base_uri(self) -> str: + """ Return the URI of the original request. + """ + @abc.abstractmethod def config(self) -> Configuration: @@ -481,7 +486,7 @@ async def search_endpoint(api: napi.NominatimAPIAsync, params: ASGIAdaptor) -> A (str(r.place_id) for r in results if r.place_id)) queryparts['format'] = fmt - moreurl = urlencode(queryparts) + moreurl = params.base_uri() + '/search?' + urlencode(queryparts) else: moreurl = ''