mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-08 23:57:46 +00:00
Properly pass preview queries to media proxy
This commit is contained in:
parent
3b53e5be4c
commit
a18db1e2b7
4 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue