2.0.1 • Published 4 years ago

hapi-forwarded-for v2.0.1

Weekly downloads
339
License
MIT
Repository
github
Last release
4 years ago

Build Status

hapi-forwarded-for

hapi.js v19+ plugin: sets request.info.remoteAddress from x-forwarded-for header when proxies are in front of hapi

Installation

npm install --save hapi-forwarded-for

or

yarn add hapi-forwarded-for

Usage

let server = new Hapi.Server();
await server.register({ plugin: require('hapi-forwarded-for') });

server.route({
    method: 'GET',
    path: '/',
    handler: (request, h) => {
        return request.info.remoteAddress;
    }
});

License

MIT

2.0.1

4 years ago

2.0.0

4 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago