Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit f2287c8

Browse files
committed
fix options blocks
1 parent 8edf6b1 commit f2287c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ async fn main() -> std::io::Result<()> {
290290

291291
let path = req.path().to_string();
292292

293-
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") {
293+
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") {
294294
let fut = async move {
295295
let response = HttpResponse::Forbidden().json(models::error::ApiError {
296296
error: "read_only",

0 commit comments

Comments
 (0)