1 parent
528017b0e6
commit
9e65aa0103
27 files changed
+1053
-101
No files matched your search
+9
-1
@@ -146,7 +146,9 @@ async fn request_log(
|
||||
|| path.starts_with("/icons/")
|
||||
|| path == "/healthz"
|
||||
|| path == "/metrics";
|
||||
if status.is_client_error() || status.is_server_error() {
|
||||
if ms >= 300 {
|
||||
tracing::warn!(target: "access", "slow request: {ip} {method} {path}{query} status {} ({ms} ms) · {ua}", status.as_u16());
|
||||
} else if status.is_client_error() || status.is_server_error() {
|
||||
tracing::warn!(target: "access", "{ip} {method} {path}{query} status {} ({ms} ms) · {ua}", status.as_u16());
|
||||
} else if noisy {
|
||||
tracing::debug!(target: "access", "{ip} {method} {path}{query} status {} ({ms} ms) · {ua}", status.as_u16());
|
||||
@@ -175,6 +177,8 @@ pub fn router(state: State) -> Router {
|
||||
.route("/api/me/password", post(api::change_password))
|
||||
.route("/api/me/prefs", get(api::my_prefs).put(api::save_my_prefs))
|
||||
.route("/api/me/sessions", get(api::my_sessions))
|
||||
.route("/api/pair/{code}", get(api::pair_info))
|
||||
.route("/api/pair/{code}/confirm", post(api::pair_confirm))
|
||||
.route("/api/me/sessions/others", post(api::end_other_sessions))
|
||||
.route("/api/me/sessions/{id}", delete(api::end_session))
|
||||
.route("/api/backup/database", get(api::backup_download))
|
||||
@@ -284,6 +288,7 @@ fn public_routes() -> Router<State> {
|
||||
.route("/playlist.m3u", get(public::playlist))
|
||||
.route("/playlist.m3u8", get(public::playlist))
|
||||
.route("/epg.xml", get(public::epg_xml))
|
||||
.route("/hls/leave", post(public::hls_leave))
|
||||
.route("/hls/{ch}/index.m3u8", get(public::hls_playlist))
|
||||
.route("/hls/{ch}/{seg}", get(public::hls_segment))
|
||||
.route("/stream/{ch}", get(public::ts_stream))
|
||||
@@ -296,6 +301,9 @@ fn public_routes() -> Router<State> {
|
||||
.route("/recordings/{id}/file", get(public::recording_file))
|
||||
.route("/metrics", get(public::metrics))
|
||||
.route("/healthz", get(|| async { "ok" }))
|
||||
// TV app pairing (QR code)
|
||||
.route("/api/pair/start", post(api::pair_start))
|
||||
.route("/api/pair/poll", get(api::pair_poll))
|
||||
// tvheadend-compatible
|
||||
.route("/playlist", get(tvh::playlist_all))
|
||||
.route("/playlist/{a}", get(tvh::playlist_all_sub))
|
||||
|
||||
Reference in new issue
Block a user