@jensfranke Another idea just came to me: You could use some DNS tricks to override the actual IP of the production URL when on a local network.
On *nix systems you’d add local hosts in /etc/hosts. You may have seen this before when working with local domains, i.e. mycomputer.local or my-app.dev or similar.
# Override the IP for google.com
# Requests for google.com will not work, as the below IP
# doesn't serve google's site.
# Note that you'll need a second entry for www
# and any additional subdomains
# You cannot use wildcards or globs in /etc/hosts
# Doesn't work:
Now when developing locally, this setting will override the IP address your machine looks up to use the API URL, where as other machines or networks without this setting will use the default IP, which usually comes from some DNS provider.
Then you wouldn’t have to worry about storing this value in Kirby; defer it to the network.
Surely this approach has some caveats, but it’s worth throwing in as an option.