Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F281208
lb.php
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
epriestley
Feb 2 2015, 9:11 PM
2015-02-02 21:11:41 (UTC+0)
Size
845 B
Referenced Files
None
Subscribers
None
lb.php
View Options
// If this request is coming from within the cluster, we'll trust HTTP
// headers added by the load balancer. We do not trust these headers for
// requests which do not originate from within the cluster, because they
// are client-controlled if the request is being received directly.
if
(
PhacilityServices
::
isClusterRequest
())
{
// Since we terminate SSL at the ELB, requests are normally HTTP by the
// time they reach the server, even if they were originally HTTPS. The
// ELB sets this header to indicate that the original request was HTTPS.
if
(
idx
(
$_SERVER
,
'HTTP_X_FORWARDED_PROTO'
)
==
'https'
)
{
$_SERVER
[
'HTTPS'
]
=
true
;
}
$forwarded_for
=
idx
(
$_SERVER
,
'HTTP_X_FORWARDED_FOR'
);
if
(
$forwarded_for
)
{
$_SERVER
[
'REMOTE_ADDR'
]
=
$forwarded_for
;
}
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/iv/gx/xhniuei3spe4cgro
Default Alt Text
lb.php (845 B)
Attached To
Mode
P1714 lb.php
Attached
Detach File
Event Timeline
Log In to Comment