简体   繁体   中英

Ngrok not forwarding POST request data

I'm exposing my local server to the inte.net using ngrok for which I wrote the following code:

const ngrok = require('ngrok')

ngrok.connect({
    proto: 'http', 
    addr: 3000, 
    authtoken: '<my-token>',
}).then(url => console.log(url))

The trigger for the api endpoint/webhook is a POST request which sends some data in request object. When I visit http://localhost:4040 to inspect the logs of the original request, I can see the data required by my local application. But maybe ngrok modifies the original request object and doesn't forward the original POST data to my application. Any solutions to this?

If you're seeing the data in the localhost:4040 logs, it's hitting your app.

We don't drop/modify fields or parameters from the requests unless you tell us to.

~ an ngrok employee

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM