How can I serve Angular 4 localhost to ngrok?

s_kirkiles picture s_kirkiles · Aug 2, 2017 · Viewed 8.5k times · Source

I would like to use ngrok to make my local development available to external apis that need to use webhooks with it but when I run ngrok on port 4200, Angular gives me Invalid Host Header when I try to access the site from the ngrok link. Does anyone know how I can access an angular ng serve from outside localhost with ngrok?

Thanks

Answer

martin8768 picture martin8768 · Sep 15, 2017

I managed to get past the invalid host header, if you do ng serve --disable-host-check you won't get that error and it should run in ngrok.

edit: I've been trying to use ngrok for a remote selenium grid but can't get that to work if anyone has any ideas let me know