Fix conduit host check
Summary:
conduit was using getProductionURI instead of getURI for checking that the
request was sent to the correct host, which causes problems in some dev
environments
Test Plan:
echo '{}' | arc call-conduit --conduit-uri=mydevserver
where my dev server is configured with phabricator.production-uri pointing to
prod instead of my devserver
Reviewers: epriestley, btrahan, jungejason
Reviewed By: epriestley
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1543
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -85,7 +85,7 @@ abstract class ConduitAPIMethod {
|
||||
$host->setPath('/');
|
||||
$host = (string)$host;
|
||||
|
||||
$self = PhabricatorEnv::getProductionURI('/');
|
||||
$self = PhabricatorEnv::getURI('/');
|
||||
if ($self !== $host) {
|
||||
throw new Exception(
|
||||
"Your client is connecting to this install as '{$host}', but it is ".
|
||||
|
||||
Reference in New Issue
Block a user