Fix insecure issue

This commit is contained in:
Henry Hiles 2025-04-17 18:24:40 -04:00
parent 21decba502
commit 8f0c07c950
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
2 changed files with 25 additions and 23 deletions

View file

@ -7,7 +7,7 @@
lk-jwt-service = { lk-jwt-service = {
enable = true; enable = true;
livekit = { livekit = {
url = "ws://livekit.henryhiles.com/sfu"; url = "wss://call.henryhiles.com/livekit/sfu";
keyFile = config.age.secrets."livekitKeys.age".path; keyFile = config.age.secrets."livekitKeys.age".path;
}; };
}; };
@ -17,9 +17,9 @@
keyFile = config.age.secrets."livekitKeys.age".path; keyFile = config.age.secrets."livekitKeys.age".path;
}; };
caddy.virtualHosts = { caddy.virtualHosts."call.henryhiles.com".extraConfig = ''
"call.henryhiles.com".extraConfig = ''
root * ${pkgs.element-call} root * ${pkgs.element-call}
route {
respond /config.json `${builtins.toJSON { respond /config.json `${builtins.toJSON {
default_server_config = { default_server_config = {
"m.homeserver" = { "m.homeserver" = {
@ -27,19 +27,21 @@
"server_name" = "henryhiles.com"; "server_name" = "henryhiles.com";
}; };
}; };
livekit.livekit_service_url = "https://livekit.henryhiles.com"; livekit.livekit_service_url = "https://call.henryhiles.com/livekit";
}}` 200 }}` 200
try_files {path} {path}/ /index.html handle /livekit/sfu/get {
file_server uri strip_prefix /livekit
'';
"livekit.henryhiles.com".extraConfig = ''
handle_path /sfu/get {
reverse_proxy 127.0.0.1:8080 reverse_proxy 127.0.0.1:8080
} }
handle_path /livekit/sfu* {
reverse_proxy 127.0.0.1:7880 reverse_proxy 127.0.0.1:7880
}
try_files {path} {path}/ /index.html
file_server
}
''; '';
}; };
};
} }

View file

@ -14,7 +14,7 @@ in {
livekit = { livekit = {
url = lib.mkOption { url = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "The URL that livekit runs on, prefixed with `ws://`."; description = "The URL that livekit runs on, prefixed with `ws://` or `wss://` (recommended).";
}; };
keyFile = lib.mkOption { keyFile = lib.mkOption {