Links are redirecting to Private IP

I found this thread which is the issue that I’m facing

But I’m unsure where to make the change, which file(s) needs this line of code

URL::forceRootUrl( Config::get(‘app.url’) );

@mcolvin

Are these links to invoices that are showing the private IP?

from https://invoicing.DOMAIN.pro/client/subscriptions/VolejRejNm/purchase when you click the next button it will redirect to
invoice

or from emails when you click to view invoice it gives url
https://invoicing.DOMAIN.pro/client/invoice/0W9l5h9DImBkLBuzoV0zXegurf0N7G7a but then redirects to 192.168.0.248/client/login

ok, so if the links are correct in the emails, then something in your setup is rewriting those URLs.

as I stated in my original post the issue is the same issue

but i’m unsure where you change

  • Laravel uses the $_SERVER variable to determine the URL, it may be useful to check its value to narrow down the problem.
  • You may be able to fix this by checking that APP_URL is correct in the .env file in the root folder and then adding the following line of code to the top of app/Http/routes.php

URL::forceRootUrl( Config::get(‘app.url’) );

any advice @hillel or @david

Just to confirm,

have you set TRUSTED_PROXIES=* in your .env file and update the config?