send proper headers
This commit is contained in:
@@ -11,7 +11,12 @@ pub async fn stream_handler(State(state): State<Arc<AppState>>) -> Response {
|
|||||||
|
|
||||||
Response::builder()
|
Response::builder()
|
||||||
.header("Content-Type", "audio/mpeg")
|
.header("Content-Type", "audio/mpeg")
|
||||||
.header("Cache-Control", "no-cache")
|
.header("Cache-Control", "no-cache, no-store, must-revalidate")
|
||||||
|
.header("Pragma", "no-cache")
|
||||||
|
.header("Expires", "0")
|
||||||
|
.header("Accept-Ranges", "none")
|
||||||
|
.header("Transfer-Encoding", "chunked")
|
||||||
|
.header("X-Content-Duration", "infinity")
|
||||||
.body(body)
|
.body(body)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user