ngrok with https on localhost returns 502

痞子三分冷 提交于 2019-12-23 17:25:40

问题


I need to debug webhooks in an asp.net core 2 api hosted with kestrel. It only runs in https : https://localhost:44338 (accessible, works fine)

I thought ngrok would be fast to use but I'm always redirected to an error 502.

I've tried those conbinations I found in other posts:

ngrok http -region=eu -bind-tls=true -host-header=rewrite localhost:44338
ngrok http 44338 -region=eu -host-header="localhost:44338"
ngrok.exe http -region=eu -host-header=rewrite localhost:44338
ngrok tls -region=eu -hostname=localhost 44338

added to

netsh http add urlacl url=https://xxx.ngrok.io:44338/ user=everyone

but no change, any idea?

EDIT :

ngrok http -region=eu -host-header=rewrite localhost:8592
netsh http add urlacl url=http://xxxxxxxx.eu.ngrok.io:8592/ user=everyone

回答1:


I've just found myself in the same predicament, I have a .net core 2.2 project using a Kestrel server which isserving up https on port 5001 (out of the box).

In order to get ngrok to work (version 2.3.29 - downloaded at time of writing as new PC which I've not used it on before).

Running simply just ngrok http https://localhost:5001 returned urls that I can now use to debug webhooks.

Hope this helps.



来源:https://stackoverflow.com/questions/49648031/ngrok-with-https-on-localhost-returns-502

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!