]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/api/v1/server_glue.py
provide full URL in more field
[nominatim.git] / nominatim / api / v1 / server_glue.py
index d83adaae646d51f5ca03750e545d91b6eae68db1..d1bcc1dab0d3050bd5ec2a0cad40f1fbad9f0b58 100644 (file)
@@ -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 = ''