feat: Update cinny to use hashRouter and update caddy reverse proxy
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m22s
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m22s
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
defaultHomeserver = 0;
|
||||
homeserverList = ["darksailor.dev" "matrix.org"];
|
||||
allowCustomHomeservers = false;
|
||||
hashRouter = {
|
||||
enabled = true;
|
||||
basename = "/";
|
||||
};
|
||||
};
|
||||
cinnyConfigFile = pkgs.writeText "cinny-config.json" cinnyConfig;
|
||||
in {
|
||||
@@ -68,14 +72,18 @@ in {
|
||||
};
|
||||
services.caddy.virtualHosts = {
|
||||
"matrix.${base_domain}".extraConfig = ''
|
||||
reverse_proxy /_matrix/* localhost:${toString port}
|
||||
handle /_matrix/* {
|
||||
reverse_proxy /_matrix/* localhost:${toString port}
|
||||
}
|
||||
handle_path /config.json {
|
||||
file_server
|
||||
root ${cinnyConfigFile}
|
||||
}
|
||||
root * ${pkgs.cinny}
|
||||
try_files {path} / index.html
|
||||
file_server
|
||||
handle {
|
||||
root * ${pkgs.cinny}
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
'';
|
||||
"${base_domain}".extraConfig = ''
|
||||
reverse_proxy /.well-known/* localhost:${toString port}
|
||||
|
||||
Reference in New Issue
Block a user