Fix webui endpoints

This commit is contained in:
Ethan O'Brien 2024-10-19 11:01:29 -05:00
parent 8ed43c8625
commit aa78e9dfbd

View file

@ -173,7 +173,7 @@ pub async fn request(req: HttpRequest, body: String) -> HttpResponse {
if args.hidden && req.path().starts_with("/api/webui/") {
return not_found(&headers);
}
if headers.get("aoharu-asset-version").is_none() && req.path().starts_with("/api") {
if headers.get("aoharu-asset-version").is_none() && req.path().starts_with("/api") && !req.path().starts_with("/api/webui") {
if args.hidden {
return not_found(&headers);
} else {