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