Update well-known matrix

This commit is contained in:
2022-04-11 14:26:50 +01:00
parent a5a0f367cb
commit e02557ba90
2 changed files with 13 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
{ pkgs, lib, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 8448 443 ];
services.caddy = {
enable = true;
virtualHosts = {
@@ -18,6 +20,15 @@
'';
};
"broccoli.town" = {
extraConfig = ''
header /.well-known/* "Access-Control-Allow-Origin" "*"
respond /.well-known/matrix/client "{\"m.homeserver\": {\"base_url\": \"https://broccoli.town\"}}"
reverse_proxy /_matrix/* http://localhost:8008
reverse_proxy /_synapse/client/* http://localhost:8008
'';
};
"chat.broccoli.town" = {
extraConfig = ''
header {
@@ -29,8 +40,8 @@
root * ${pkgs.element-web.override {
conf = {
default_server_config."m.homeserver" = {
"base_url" = "https://matrix.broccoli.town";
"server_name" = "matrix.broccoli.town";
"base_url" = "https://broccoli.town";
"server_name" = "broccoli.town";
};
};
}