Internal IP in some links

v5.1.34-C45
Some links use the machine’s local IP when creating URLs instead of the domain name. I added a user under user management. The email went out fine and the link in the email used the domain name. Once on the page to choose a password both the form and invoice ninja icon on that page use the local IP in the URL instead of the domain name. I’ve been told this also happened somewhere in the client’s portal but I haven’t been able verify this myself yet. Any idea how I can fix this?

Hi,

Thanks for reporting this, are you using a proxy?

cc @david, @ben

some parts of the code use relative links, so if the server is seeing a diffferent IP such as when using a proxy, then this will happen.

Indeed I am. I have multiple services using port 443 and one public IP so I have a reverse proxy setup. The local DNS resolves the domain name to the local address while external connections go through the reverse proxy. Sure enough the set password page from within the network uses the domain name

Adding the IP of my reverse proxy to the env file like below appears to have resolved the issue. Thanks for pointing me in the right direction
TRUSTED_PROXIES=‘10.13.37.5’