fix: correct paths

This commit is contained in:
dusk 2023-05-09 10:56:08 +03:00
parent aea3ff86f6
commit 792efb0c9f
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
3 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@ pub(crate) async fn http(
"proxying request to {}:{} with headers {:?}",
app.musikcubed_address,
app.musikcubed_http_port,
req.headers()
request.headers()
);
app.make_musikcubed_request(format!("{path}{query_prefix}{query}"), request)

View File

@ -44,7 +44,7 @@ pub(crate) async fn get_scoped_music_thumbnail(
return Err("music id not found".into());
};
app.make_musikcubed_request(
format!("thumbnail/{}", info.thumbnail_id),
format!("/thumbnail/{}", info.thumbnail_id),
Request::new(Body::empty()),
)
.await
@ -62,7 +62,7 @@ pub(crate) async fn get_scoped_music_file(
req.headers_mut().insert(RANGE, range);
}
let mut resp = app
.make_musikcubed_request(format!("audio/external_id/{music_id}"), req)
.make_musikcubed_request(format!("/audio/external_id/{music_id}"), req)
.await?;
if resp.status().is_success() {
// add cache header

View File

@ -107,7 +107,7 @@ impl AppStateInternal {
mut req: http::Request<hyper::Body>,
) -> Result<http::Response<hyper::Body>, AppError> {
*req.uri_mut() = format!(
"http://{}:{}/{}",
"http://{}:{}{}",
self.musikcubed_address,
self.musikcubed_http_port,
path.as_ref()