fix any request being treated as a GUI upload form

This commit is contained in:
blek 2023-12-12 16:30:03 +10:00
parent 8de83749a3
commit 739bf5e370
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 2 additions and 1 deletions

View File

@ -307,7 +307,8 @@ pub async fn upload(form: FormData, ip: Option<IpAddr>, state: SharedState) -> R
}
pub fn get_routes(state: SharedState) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {
warp::post()
warp::path("upload")
.and(warp::post())
.and(warp::multipart::form())
.and(real_ip(vec![state.env.proxy_addr]))
.and(