summaryrefslogtreecommitdiff
path: root/src/Controllers/ServerDiscoveryController.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-08-10 10:46:41 +0200
committerDaniel Weipert <git@mail.dweipert.de>2025-08-10 10:46:41 +0200
commitc14579871fa1241713128a2d0d5514af004e3371 (patch)
tree6b28c42958650d94c9aa1947a0b5c32eb869d89f /src/Controllers/ServerDiscoveryController.php
initial commit
Diffstat (limited to 'src/Controllers/ServerDiscoveryController.php')
-rw-r--r--src/Controllers/ServerDiscoveryController.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Controllers/ServerDiscoveryController.php b/src/Controllers/ServerDiscoveryController.php
new file mode 100644
index 0000000..e5fdd31
--- /dev/null
+++ b/src/Controllers/ServerDiscoveryController.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace App\Controllers;
+
+use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\HttpFoundation\JsonResponse;
+
+class ServerDiscoveryController
+{
+ public function server(): Response
+ {
+ return new JsonResponse([
+ "m.server" => "$_ENV[DOMAIN]:443",
+ ]);
+ }
+
+ public function client(): Response
+ {
+ return new JsonResponse([
+ "m.homeserver" => [
+ "base_url" => "https://$_ENV[DOMAIN]",
+ ],
+ ]);
+ }
+}