wow
Some checks failed
CI / check (push) Has been cancelled
CI / ida (push) Has been cancelled
CI / cpt (push) Has been cancelled
CI / build-nixos (ena) (push) Has been cancelled
CI / build-nixos (hako) (push) Has been cancelled
CI / build-nixos (kazusa) (push) Has been cancelled
CI / build-nixos (mizuki) (push) Has been cancelled

This commit is contained in:
암냥 2026-07-04 14:19:40 +09:00
commit fd667ed303
No known key found for this signature in database

View file

@ -68,8 +68,8 @@ let
<script> <script>
var video = document.getElementById("video"); var video = document.getElementById("video");
var label = document.getElementById("stream"); var label = document.getElementById("stream");
var path = window.location.pathname.replace(/^\/+|\/+$/g, ""); var match = window.location.pathname.match(/^\/play\/([^/]+)\/?$/);
var name = path && !path.startsWith("live/") ? path.split("/")[0] : "stream"; var name = match ? decodeURIComponent(match[1]) : "stream";
var source = "https://stream.mizuki.guru/live/" + name + "/" + name + ".m3u8"; var source = "https://stream.mizuki.guru/live/" + name + "/" + name + ".m3u8";
label.textContent = source; label.textContent = source;
@ -183,12 +183,24 @@ in
''; '';
virtualHosts."stream.mizuki.guru".extraConfig = '' virtualHosts."stream.mizuki.guru".extraConfig = ''
@hls path_regexp hls ^/[^/]+/[^/]+/[^/]+\.(m3u8|ts)$ handle /live/* {
reverse_proxy @hls 127.0.0.1:10023 reverse_proxy 127.0.0.1:10023
}
root * ${streamPlayer} handle /play/* {
try_files {path} /index.html root * ${streamPlayer}
file_server rewrite * /index.html
file_server
}
handle / {
root * ${streamPlayer}
file_server
}
handle {
respond "Not Found" 404
}
''; '';
virtualHosts."netbird.mizuki.guru".extraConfig = '' virtualHosts."netbird.mizuki.guru".extraConfig = ''