Samagra-Development / yaus

Yet Another URL Shortner
https://github.com/Samagra-Development/yaus/wiki
11 stars 28 forks source link

Health check failing for service(s) running behind proxy #45

Open choxx opened 1 year ago

choxx commented 1 year ago

Describe the bug Health check failing for dependent service(s) example RabbitMq which are running behind the proxy on same (or different local/remote host); e.g. a swarm setup where RabbitMq is running as a separate independent service and not on localhost/same container.

Refer to line: https://github.com/Samagra-Development/yaus/blob/master/apps/api/src/app/app.controller.ts#L56 which is strictly checking for localhost.

To Reproduce Steps to reproduce the behavior: Try setting up RabbitMQ under a different swarm environment under same or different server & setup Yaus project & see if the /api/health endpoint is reporting the error.

Expected behavior Health check API must not fail as the.

Screenshots image