For the ports setting of 127.0.0.1:58484:8484, sounds like there is a reverse proxy wrapping Grist, is that right? Can you check if it is configured to preserve the Host header? For Nginx I think this would be something like proxy_set_header Host $http_host;
For historic reasons, Grist automatically tries to adapt to the Host in a few ways:
None of them are really appropriate for a simple self-hosting setup. I’ll look into simplifying this. I think in your setup Grist mistakenly believes it is hosted at 127.0.0.1.