Inconsistent Base URI in REST API Responses

Application Name: , Bahmni Version Number: 1.0.0

Question: Hi OpenMRS community,

We’ve been encountering an issue with our OpenMRS setup, which is deployed on our home server machine. Occasionally, REST API responses return an incorrect base URI. Instead of returning our domain name (e.g., https://homeserver.example.com), the response includes http://openmrs:8080 as the base URI. Here is an example of the response we received: { “results”: [ { “uuid”: “160855AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA”, “display”: “Medication frequency”, “links”: [ { “rel”: “self”, “uri”: “http://openmrs:8080/openmrs/ws/rest/v1/concept/160855AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA”, “resourceAlias”: “concept” } ] } ] } GET https://homeserver.example.com/openmrs/ws/rest/v1/concept?name=Medication frequency&s=default

The issue resolved itself after restarting OpenMRS, but it has occurred multiple times. We suspect this might be due to some configuration or networking issues on our home server, but we are not sure where to start debugging.

Has anyone else experienced this issue, or does anyone have suggestions on how to ensure the base URI remains consistent in API responses?

Thank you!

.**