Allow setting multiple BASEROW_PUBLIC_URL
Currently, if you're using the all-in-one image, or even the docker-compose.yml with Caddy, then it's only possible to access the tool by visiting the BASEROW_PUBLIC_URL
. This is fine in most cases, but if someone wants to access their Baserow environment on both the BASEROW_PUBLIC_URL
and maybe a private internal URL, then it's not possible because all other domains/urls are treated as published applications. The tool is only served on the BASEROW_PUBLIC_URL
.
We have multiple ways of configuring the environment. The BASEROW_PUBLIC_URL
is eventually split into the PUBLIC_BACKEND_URL
and PUBLIC_WEB_FRONTEND_URL
. There is also the possibility of setting extra allowed hosts, but this is only related to be backend and not something we want to implement now. We would still want to keep those for a multiservice setup.
This issue is about introducing a new environment variable, perhaps called BASEROW_EXTRA_PUBLIC_URLS
where multiple URLs, splitted by a comma can be added. If the user visits that one of the additional URLs, then the tool must be served, and must not be treated as published application.
The reason why I think we should introduce a new environment variable instead of modifying the existing ones, is because we always want to have one main BASEROW_PUBLIC_URL
that's used as a reference when sending emails and creating absolute urls for example. Introducing a new environment variable makes it clear that these are the extra urls, and can't be mixing up the primary and secondary urls.
Requirements
- The
BASEROW_EXTRA_PUBLIC_URLS
must be accepted by theask-public-domain-exists
endpoint. - The
/api
and/ws
paths must be accessible on the extra urls. - The web-frontend must serve the tool frontend routes on the extra urls.
- The hostnames of the extra urls must be added to the ALLOWED_HOSTS in Django.