From f2287c856a5ebb0553d5193ea33f5114e4d5fee5 Mon Sep 17 00:00:00 2001 From: Jai A Date: Sat, 6 Jan 2024 18:16:14 -0500 Subject: [PATCH] fix options blocks --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 60a0580c..6831f643 100644 --- a/src/main.rs +++ b/src/main.rs @@ -290,7 +290,7 @@ async fn main() -> std::io::Result<()> { let path = req.path().to_string(); - if parse_var("READ_ONLY").unwrap_or(false) && (req.method() != actix_web::http::Method::GET && req.method() != actix_web::http::Method::HEAD) && !path.starts_with("/v2/version_file") { + if parse_var("READ_ONLY").unwrap_or(false) && (req.method() != actix_web::http::Method::GET && req.method() != actix_web::http::Method::HEAD && req.method() != actix_web::http::Method::OPTIONS) && !path.starts_with("/v2/version_file") { let fut = async move { let response = HttpResponse::Forbidden().json(models::error::ApiError { error: "read_only",