mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Let PhabricatorPlatformSite catch unconfigured requests
Summary: Fix T8717. If the install didn't configure base-uri, assume they want Phabricator; We'll later show the setup warning about it. Test Plan: Set base-uri to something else, see short error. Delete it, see Phabricator. Reviewers: laomoi, #blessed_reviewers, epriestley Reviewed By: laomoi, #blessed_reviewers, epriestley Subscribers: laomoi, epriestley, Korvin Maniphest Tasks: T8717 Differential Revision: https://secure.phabricator.com/D13482
This commit is contained in:
parent
12c6e63d5b
commit
9eda21451a
1 changed files with 8 additions and 1 deletions
|
@ -11,8 +11,15 @@ final class PhabricatorPlatformSite extends PhabricatorSite {
|
|||
}
|
||||
|
||||
public function newSiteForRequest(AphrontRequest $request) {
|
||||
// If no base URI has been configured yet, match this site so the user
|
||||
// can follow setup instructions.
|
||||
$base_uri = PhabricatorEnv::getEnvConfig('phabricator.base-uri');
|
||||
if (!strlen($base_uri)) {
|
||||
return new PhabricatorPlatformSite();
|
||||
}
|
||||
|
||||
$uris = array();
|
||||
$uris[] = PhabricatorEnv::getEnvConfig('phabricator.base-uri');
|
||||
$uris[] = $base_uri;
|
||||
$uris[] = PhabricatorEnv::getEnvConfig('phabricator.production-uri');
|
||||
|
||||
$allowed = PhabricatorEnv::getEnvConfig('phabricator.allowed-uris');
|
||||
|
|
Loading…
Reference in a new issue