Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/AphrontRequest.php
| Show First 20 Lines • Show All 644 Lines • ▼ Show 20 Lines | /* -( Working With a Phabricator Cluster )--------------------------------- */ | ||||
| * | * | ||||
| * These requests are **more dangerous** than normal requests (they can not | * These requests are **more dangerous** than normal requests (they can not | ||||
| * be safely proxied, because proxying them may cause a loop). Cluster | * be safely proxied, because proxying them may cause a loop). Cluster | ||||
| * requests are not guaranteed to come from a trusted source, and should | * requests are not guaranteed to come from a trusted source, and should | ||||
| * never be treated as safer than normal requests. They are strictly less | * never be treated as safer than normal requests. They are strictly less | ||||
| * safe. | * safe. | ||||
| */ | */ | ||||
| public function isProxiedClusterRequest() { | public function isProxiedClusterRequest() { | ||||
| return (bool)AphrontRequest::getHTTPHeader('X-Phabricator-Cluster'); | return (bool)self::getHTTPHeader('X-Phabricator-Cluster'); | ||||
| } | } | ||||
| /** | /** | ||||
| * Build a new @{class:HTTPSFuture} which proxies this request to another | * Build a new @{class:HTTPSFuture} which proxies this request to another | ||||
| * node in the cluster. | * node in the cluster. | ||||
| * | * | ||||
| * IMPORTANT: This is very dangerous! | * IMPORTANT: This is very dangerous! | ||||
| ▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines | |||||