Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn225 authored Oct 10, 2024
1 parent 70d026e commit 18da46c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zio-http/shared/src/main/scala/zio/http/Routes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 18da46c

Please sign in to comment.