I am running ngrok to forward webhooks at my local vagrant running ubuntu and apache (it is a php laravel application). I am getting intermittent bad gateway errors.
What is strange is that the inspector on http://127.0.0.1:4040/ is showing 200's
The third party system that is firing the webhooks is returning the raw html as
<html>
<body>
<h1>502 Bad Gateway</h1>
The server returned an invalid or incomplete response.
</body>
</html>
Because it works sometimes I don't think there is a problem with the setup. Any suggests would be helpful. Right now I just hit it again and again until it is successful.
One thing is that the local dev is slow,
For example from the ngrok inspector.
GET /inbound/webhook 200 OK 3.44s
I noticed that the slower response are more likely to throw a 502.
Anyone know how to fix this problem?