const Nes = require('@hapi/nes');
var client = new Nes.Client('ws://167.172.161.60:5000'); // change this with the server IP
const start = async () => {
await client.connect();
const payload = await client.request('hello'); // Can also request '/h'
// payload -> 'world!'
};
start();
I always get a request.info.remoteAddress of 127.0.0.1 when connecting remotely.
What was the result you got?
Getting a request.info.remoteAddress of 127.0.0.1 when connecting remotely.
What result did you expect?
Getting a request.info.remoteAddress of the originating IP when connecting remotely.
Support plan
Context
What are you trying to achieve or the steps to reproduce?
With this simple hapi server with hapi/nes as plugin :
Connecting like in the docs :
I always get a
request.info.remoteAddress
of 127.0.0.1 when connecting remotely.What was the result you got?
Getting a
request.info.remoteAddress
of 127.0.0.1 when connecting remotely.What result did you expect?
Getting a
request.info.remoteAddress
of the originating IP when connecting remotely.