From 18da46c809e01fa0ac4bab3c01579cb2fc2aba40 Mon Sep 17 00:00:00 2001 From: Saturn225 <101260782+Saturn225@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:44:02 +0530 Subject: [PATCH] fix --- zio-http/shared/src/main/scala/zio/http/Routes.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zio-http/shared/src/main/scala/zio/http/Routes.scala b/zio-http/shared/src/main/scala/zio/http/Routes.scala index 8695ebd2ea..cd9669c0a2 100644 --- a/zio-http/shared/src/main/scala/zio/http/Routes.scala +++ b/zio-http/shared/src/main/scala/zio/http/Routes.scala @@ -255,7 +255,7 @@ final case class Routes[-Env, +Err](routes: Chunk[zio.http.Route[Env, Err]]) { s Handler.notImplemented case _ => if (chunk.isEmpty) { - if (allowedMethods.isEmpty) { + if (allowedMethods.isEmpty || allowedMethods == Set(Method.OPTIONS)) { // If no methods are allowed for the path, return 404 Not Found Handler.notFound } else {