Http-in node raw body

Just wanted to share the solution i found for accessing raw body

add this section to your settings.js, replaving /this/that with the path you'd like to get raw body :

 httpNodeMiddleware: (req, res, next) => {
        const rawPaths = ['/this/that'];

        if (rawPaths.includes(req.url)) {
            req.headers['content-type'] = 'application/octet-stream';
        } 
        next();
      },

This seems to be solving the issue and msg.payload is now a buffer.

It worked fine on verifying apple app store connect events

That's a good tip. We have got an open PR with a proposed solution for this that doesn't require updating the settings file (so handy in environments where you can't customise your settings file). It does slightly scary things with node streams and I haven't had the time to fully validate it yet.

The proposed solution here would keep msg.payload as the parsed body, but allow you to also access the raw version on a separate property.

Perhaps your solution is a cleaner choice - avoids having two copies of the data in the message.