bbox-services / bbox

BBOX services
https://www.bbox.earth/
Apache License 2.0
55 stars 9 forks source link

url prefix #34

Open kdesjard opened 5 months ago

kdesjard commented 5 months ago

It would be useful to be able to have a url prefix configuration parameter in the case where an upstream load balancer may be using that prefix to send traffic to the bbox service.

pygeoapi has a similar config item:

api_rules:  # optional API design rules to which pygeoapi should adhere
      url_prefix: 'v{api_major}'  # adds a /v1 prefix to all URL paths

This could be accomplished using Actix's Scope mechanism.

pka commented 5 months ago

I did postpone this, because I wanted to keep the code easy to understand (e.g. paths in metdata). But yes, I'm supporting this.

kdesjard commented 5 months ago

If relative links are kept, then I suppose the prefix could be extracted from the public_server_url.