Getting 301 error when forwarding message from NGROK to Meteor webapp

Hi all:

I am running Meteor webapp/NGROK on my local to receive messages send from 3rd parties. However, the request from 3rd parties somehow couldn’t forward to my local and always get a “301 Moved Permanently” error.

This is how I set up webapp:

const app = express()

app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.raw({ type: 'application/vnd.api+json' }))

Meteor.startup(() => {
    app.all('/action-step', async (req, res) => {
    res.status(200).send('ok') 
  })
  WebApp.connectHandlers.use(app)
}
})

my NGROK (the Meteor is running on port 3080)

./ngrok http 3080

This is the information I got from NGROK(port 4040):

No problem at all if I deploy it on the AWS, but can’t receive any message from my local.

Any suggestions will be appreciated

I hope this helps some one who are using Meteor WebApp to integrate data with 3nd parties webhook but don’t have a fixed IP.

  1. start NGROK in the command line: ./ngrok http 3080 (your Meteor port)
  2. add ROOT_URL=“https://xxxxxxx.au.ngrok.io” as a parameter when you run the meteor
1 Like