Minor fix

This commit is contained in:
2023-10-05 00:48:29 +00:00
committed by GitHub
parent ab6ffba0b6
commit db101b5642

View File

@@ -36,7 +36,7 @@ impl ResponseFor<Body, Pin<Box<HttpBodyType>>> for ProxyPixivContext {
);
let url = http_error!(params.get("url").ok_or("Url is required."));
let uri = http_error!(Uri::try_from(url));
let host = uri.host().ok_or("Host is needed.")?;
let host = http_error!(uri.host().ok_or("Host is needed."));
if !host.ends_with(".pximg.net") {
http_error!(403, Err("Host is not allowed."));
}