HomeDevCentral

Get remote address

Authored by dereckson on Apr 20 2018, 20:05.

Description

Get remote address

Summary:
Provide a Request::getRemoteAddress() to use instead of
$_SERVER['REMOTE_ADDR'] to be proxy compliant.

Security

The web server is trusted to clean headers and only forward to
the PHP processes the whitelisted headers, with validated values
or with values determines by the server.

This plays very well with scenarii like nginx front-end, nginx back-end
and php-fpm.

Ref T1395

Test Plan: Unit tests are provided, from rKGF

Reviewers: dereckson

Reviewed By: dereckson

Maniphest Tasks: T1395

Differential Revision: https://devcentral.nasqueron.org/D1623

Details

Committed
derecksonApr 21 2018, 00:57
Pushed
derecksonApr 21 2018, 00:58
Reviewer
dereckson
Differential Revision
D1623: Get remote address
Parents
rKOT85ac4e4957a1: Test CodeFile::isReadable and canBeIncluded with chmod 000 file
Branches
Unknown
Tags
Unknown
Tasks
T1395: Migrate keruald/globalfunctions content to Keruald OmniTools