Exposing localhost to the internet via tunneling (using ngrok): HTTP error 400: bad request; invalid hostname

后端 未结 6 2278
Happy的楠姐
Happy的楠姐 2020-12-12 08:58

From previous versions of the question, there is this: Browse website with ip address rather than localhost, which outlines pretty much what I\'ve done so far...I\'ve got th

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 09:39

    The simplest thing for me was using iisexpress-proxy + ngrok.

    First I install iisexpress-proxy globally with npm

    npm install -g iisexpress-proxy

    Then I proxy my localhost with it. Say for instance my site is running on 3003.

    iisexpress-proxy 3003 to 12345 where 12345 is the new http port I want to proxy to.

    Then I can run ngrok on it.

    ./ngrok.exe http 12345

    It just works!

提交回复
热议问题