HomeDevCentral

Get remote address

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

Provenance
derecksonAuthored on Apr 20 2018, 20:05
derecksonPushed on Feb 19 2022, 22:15
Parents
rKERUALD85ac4e4957a1: Test CodeFile::isReadable and canBeIncluded with chmod 000 file
Branches
Unknown
Tags
Unknown

Event Timeline