Wrong URL (localhost) in watchlist email

Hi,
I 'm having an issue related to page URLs in watchlist daily email.
I have some pages in watchlist in my production XWiki, v8.4.5, I receive emails daily with updating recaps.
Last week I did CURL calls using rest web API changing my profile that is in the watchlist, I used “localhost” as url because I was working in production machine.
Since that moment, every day I see my daily mail with wrong page urls: every url has “localhost” instead of correct production URL!! (ie. link to my profile with localhost).
I tried to call rest API using the correct production url in order to rechange my profile using the correct dns name but email urls still don’t change.
How can I restore the situation?
Thank you for support
Regards

The issue is https://jira.xwiki.org/browse/XWIKI-13435 and in your case comes from the fact that you executed the very first request of the current run with “localhost” domain instead of the external one.

The workaround is to make sure the first access to your wiki (the request triggering the initialization) is done with the right domain.

I solved resending a call using the right domain url and RESTARTING the wiki (if I did’n restart it did’t change).
This morning I received an email with right urls.
Thank you

Yes, as I said what is important is the very first HTTP request after XWiki start.