Use the right header for remote IPs

This commit is contained in:
Jonathan Cremin 2016-08-07 20:41:21 +01:00
parent 2c577cb7ae
commit ffa01ba586
5 changed files with 5 additions and 5 deletions

View file

@ -14,7 +14,7 @@ const from = process.env.EMAIL_FROM;
const fromname = process.env.EMAIL_NAME;
export function* authenticate(email, password) {
const remoteIp = this.headers['x-real-ip'] || this.ip;
const remoteIp = this.headers['x-forwarded-for'] || this.ip;
if (!password || password.length < 6) {
debug('No password, or password too short');