Check X-Forwarded-For on sockets (resolves #528)

This commit is contained in:
calzoneman 2015-12-12 16:59:58 -08:00
parent 432ee7bc30
commit bfe76dae0e
3 changed files with 42 additions and 4 deletions

View file

@ -35,6 +35,9 @@ export default function initialize(app, webConfig) {
if (isTrustedProxy(req.ip)) {
req.realIP = getForwardedIP(req);
req.realProtocol = getForwardedProto(req);
} else {
req.realIP = req.ip;
req.realProtocol = req.protocol;
}
next();