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

Commit

Permalink
fix options blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Jan 6, 2024
1 parent 8edf6b1 commit f2287c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f2287c8

Please sign in to comment.