Option to set share link domain

I have a nextcloud instance that is accessible via LAN and VPN. Public access is restricted to /s/ because I want to be able to share via link but don’t want to expose the login page and potentially all my private documents to the internet.

When creating share links they either contain the LAN or the VPN IP I used to access nextcloud.

Setting ‘overwrite.cli.url’ only affects links created by the cli for example in emails sent by the system.

Setting ‘overwritehost’ results in an http redirect upon accessing the page which doesn’t work for me since access to /login is blocked from the web. Also I don’t want to unnecessarily route traffic to my home nextcloud server through WAN if I’m on the same LAN.

TL;DR: I would like to be able to set the domain name the web ui uses to create share links directly either in the admin settings or the config.php