Is there a way to call a web hook to an endpoint t...
# talk-kratos
j
Is there a way to call a web hook to an endpoint that isn't part of the docker network? Right now I'd prefer not to use docker so my app's API is running on it's own node server. The issue I am running into is, since I am running Kratos in a docker container, trying to hit a localhost URL(API's URL) on my mac it is throwing some CORS errors. Right now I am using my hostfile to mask the 127.0.0.1 IP so I can hit my API with a proper domain. When I use that same domain for my web hook in Kratos, it throws this error:
Copy code
{
  "code": 500,
  "status": "Internal Server Error",
  "message": "failed to call web hook Post \"<http://api.myapi.com:30001/users/new-registration>\": dial tcp 127.0.0.1:30001: connect: connection refused"
}
p
You will need to call your Host IP from the docker container in order to hit a
localhost
URL. If you're using the latest version of Docker for mac, you should be able to use
docker.for.mac.localhost
to resolve to this IP.