Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I serve Angular 4 localhost to ngrok?

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

like image 332
s_kirkiles Avatar asked Aug 02 '17 17:08

s_kirkiles


1 Answers

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

like image 149
martin8768 Avatar answered Dec 10 '22 20:12

martin8768