Endpoint on website not matching URL in source code reddit / selfhosted ---------------------------------------------------------------------- kaydenisdead · 2023-10-16 03:23 Hi there, I got all of my docker containers from my stack proxied to their respective domains using nginx proxy manager. But for some reason, when trying to test a form, i should requesting the "api.domain.com" url but on the website i'm requesting locahost "[127.0.0.1](https://127.0.0.1)". This is also running a fresh build from docker-compose. All the containers are in the same network, if that matters... In full honesty im stumped and just don't know where to even start to try debugging this. Any help is appreciated thanks. [hard coded link](https://preview.redd.it/hegn8mqhghub1.png?width=717& format=png&auto=webp&s=3c2815c1251ca635795b59467a9759069816b0b3) https://preview.redd.it/ikrfjchbghub1.png?width=332&format=png&auto=we bp&s=cc685af785050bbe75eaa17862eef180508f3212 ---------------------------------------------------------------------- adamshand · 2023-10-16 08:33 If I’m understanding correctly … The application thinks it’s running on localhost so is generating internal links pointing to localhost. You need to configure it so that it knows it’s url is api.domain.com. This is a setting in the app somewhere, not in docker or nginx. ---------------------------------------------------------------------- Eldiabolo18 · 2023-10-16 10:24 Is this a selfbuily application or could you tell us what it is? P ---------------------------------------------------------------------- kaydenisdead · 2023-10-16 16:50 yes this is all self built. Specifically a main site, an admin dash, and a backend written from scratch in go. ---------------------------------------------------------------------- kaydenisdead · 2023-10-16 16:54 I don't really understand how it's possible to think it's running one way or the other, considering im running a build and not a dev environment? plus either way I have hardcoded that the URL it should request is the [api.domain.com](https://api.domain.com), and not localhost. ill try to look into though and see if I goofed up anywhere. ---------------------------------------------------------------------- Perfect_Designer4885 · 2023-10-16 22:34 In which case it will be hard coded either by you or a library you are using, to use localhost/127.0.0.1. You will need to find where it references that address and override it in your code to use the domain name you require.