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",