Add a user-accessible hook for dumping debug code into an install

Summary:
Currently, there's no easy way for me to tell a user "run this code from the webserver and tell me what it says". Sometimes installs can add new .php files to, e.g., `webroot/rsrc/`, but this is setup-dependent and not universal. Generally I resort to saying "put this into index.php", but that's error prone and not acceptable on active installs.

Add a "debug" controller so I can instead say "put this into support/debug.php, then visit /debug/".

Test Plan: Visited /debug/ with and without support/debug.php files. Visited /staus/.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5212
This commit is contained in:
epriestley
2013-03-04 13:45:51 -08:00
parent 413c65b608
commit 14569ae491
5 changed files with 47 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
<?php
final class PhabricatorStatusController extends PhabricatorController {
public function shouldRequireLogin() {
return false;
}
public function processRequest() {
$response = new AphrontWebpageResponse();
$response->setContent("ALIVE\n");
return $response;
}
}