Properly pass preview queries to media proxy

This commit is contained in:
spikecodes 2021-04-08 22:26:03 -07:00
parent 3b53e5be4c
commit a18db1e2b7
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
4 changed files with 6 additions and 6 deletions

View file

@ -7,7 +7,7 @@ use std::{result::Result, str::FromStr};
use crate::server::RequestExt;
pub async fn proxy(req: Request<Body>, format: &str) -> Result<Response<Body>, String> {
let mut url = format.to_string();
let mut url = format!("{}?{}", format, req.uri().query().unwrap_or_default());
for (name, value) in req.params().iter() {
url = url.replace(&format!("{{{}}}", name), value);