Page MenuHomePhabricator

D11422.id27439.diff
No OneTemporary

D11422.id27439.diff

diff --git a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
--- a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
+++ b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php
@@ -140,8 +140,8 @@
$ssl_key = PhabricatorEnv::getEnvConfig('notification.ssl-key');
$ssl_cert = PhabricatorEnv::getEnvConfig('notification.ssl-cert');
- $server_uri = PhabricatorEnv::getEnvConfig('notification.server-uri');
- $server_uri = new PhutilURI($server_uri);
+ $admin_uri = PhabricatorEnv::getEnvConfig('notification.admin-uri');
+ $admin_uri = new PhutilURI($admin_uri);
$client_uri = PhabricatorEnv::getEnvConfig('notification.client-uri');
$client_uri = new PhutilURI($client_uri);
@@ -152,8 +152,8 @@
$server_argv[] = '--client-port='.coalesce(
$this->clientPort,
$client_uri->getPort());
- $server_argv[] = '--admin-port='.$server_uri->getPort();
- $server_argv[] = '--admin-host='.$server_uri->getDomain();
+ $server_argv[] = '--admin-port='.$admin_uri->getPort();
+ $server_argv[] = '--admin-host='.$admin_uri->getDomain();
if ($ssl_key) {
$server_argv[] = '--ssl-key='.$ssl_key;
diff --git a/src/applications/config/option/PhabricatorNotificationConfigOptions.php b/src/applications/config/option/PhabricatorNotificationConfigOptions.php
--- a/src/applications/config/option/PhabricatorNotificationConfigOptions.php
+++ b/src/applications/config/option/PhabricatorNotificationConfigOptions.php
@@ -29,13 +29,23 @@
$this->newOption(
'notification.client-uri',
'string',
- 'http://localhost:22280/')
- ->setDescription(pht('Location of the client server.')),
+ 'ws://localhost:22280/')
+ ->setDescription(
+ pht(
+ 'Location of the client server. Specifying `%s` means that the '.
+ 'Aphlict server can be accessed using the same hostname as '.
+ 'ordinary web requests. Note that the protocol is ignored (the '.
+ 'protocol will be `%s` for HTTP requests and `%s` for HTTPS).',
+ 'localhost',
+ 'ws',
+ 'wss')),
$this->newOption(
- 'notification.server-uri',
+ 'notification.admin-uri',
'string',
'http://localhost:22281/')
- ->setDescription(pht('Location of the notification receiver server.')),
+ ->setDescription(
+ pht(
+ 'Location of the notification admin server.')),
$this->newOption('notification.log', 'string', '/var/log/aphlict.log')
->setDescription(pht('Location of the server log file.')),
$this->newOption('notification.ssl-key', 'string', null)
diff --git a/src/applications/notification/client/PhabricatorNotificationClient.php b/src/applications/notification/client/PhabricatorNotificationClient.php
--- a/src/applications/notification/client/PhabricatorNotificationClient.php
+++ b/src/applications/notification/client/PhabricatorNotificationClient.php
@@ -5,7 +5,7 @@
const EXPECT_VERSION = 6;
public static function getServerStatus() {
- $uri = PhabricatorEnv::getEnvConfig('notification.server-uri');
+ $uri = PhabricatorEnv::getEnvConfig('notification.admin-uri');
$uri = new PhutilURI($uri);
$uri->setPath('/status/');
@@ -39,11 +39,11 @@
}
private static function postMessage(array $data) {
- $server_uri = PhabricatorEnv::getEnvConfig('notification.server-uri');
- $server_uri = id(new PhutilURI($server_uri))
+ $admin_uri = PhabricatorEnv::getEnvConfig('notification.admin-uri');
+ $admin_uri = id(new PhutilURI($admin_uri))
->setPath('/');
- id(new HTTPSFuture($server_uri, json_encode($data)))
+ id(new HTTPSFuture($admin_uri, json_encode($data)))
->setMethod('POST')
->setTimeout(1)
->resolvex();
diff --git a/src/applications/notification/setup/PhabricatorAphlictSetupCheck.php b/src/applications/notification/setup/PhabricatorAphlictSetupCheck.php
--- a/src/applications/notification/setup/PhabricatorAphlictSetupCheck.php
+++ b/src/applications/notification/setup/PhabricatorAphlictSetupCheck.php
@@ -30,11 +30,11 @@
$this->newIssue('aphlict.connect')
- ->setShortName(pht('Notification Server Down'))
- ->setName(pht('Unable to Connect to Notification Server'))
+ ->setShortName(pht('Notification Admin Server Down'))
+ ->setName(pht('Unable to Connect to Notification Admin Server'))
->setMessage($message)
->addRelatedPhabricatorConfig('notification.enabled')
- ->addRelatedPhabricatorConfig('notification.server-uri')
+ ->addRelatedPhabricatorConfig('notification.admin-uri')
->addCommand(
pht(
"(To start the server, run this command.)\n".
diff --git a/src/docs/user/configuration/notifications.diviner b/src/docs/user/configuration/notifications.diviner
--- a/src/docs/user/configuration/notifications.diviner
+++ b/src/docs/user/configuration/notifications.diviner
@@ -75,13 +75,13 @@
You may also want to adjust these settings:
- - `notification.client-uri` Externally-facing host and port that browsers will
- connect to in order to listen for notifications.
- - `notification.server-uri` Internally-facing host and port that Phabricator
+ - `notification.client-uri`: Externally-facing host and port that browsers
+ will connect to in order to listen for notifications.
+ - `notification.admin-uri`: Internally-facing host and port that Phabricator
will connect to in order to publish notifications.
- - `notification.log` Log file location for the server.
- - `notification.pid` Pidfile location used to stop any running server when
- aphlict is restarted.
+ - `notification.log`: Log file location for the server.
+ - `notification.pid`: Pidfile location used to stop any running server when
+ Aphlict is restarted.
Verifying Server Status

File Metadata

Mime Type
text/plain
Expires
Sep 16 2025, 10:59 PM (17 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
9030341
Default Alt Text
D11422.id27439.diff (5 KB)

Event Timeline