From 5f7d692bf5726da7675e708b651f3c7fa27e737a Mon Sep 17 00:00:00 2001 From: Saturn225 <101260782+Saturn225@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:07:35 +0530 Subject: [PATCH] fix: OPTIONS --- 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 0a465c570d..c4dc368d65 100644 --- a/zio-http/shared/src/main/scala/zio/http/Routes.scala +++ b/zio-http/shared/src/main/scala/zio/http/Routes.scala @@ -257,7 +257,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 {