From 2c7519c7f448e9a2fd0e4261c7481aef579e29b5 Mon Sep 17 00:00:00 2001 From: Jadit19 Date: Mon, 7 Oct 2024 21:52:36 +0530 Subject: [PATCH] cors allowMethod invalid return --- src/middleware/cors.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/middleware/cors.cpp b/src/middleware/cors.cpp index 6e93ff1..58b8f9c 100644 --- a/src/middleware/cors.cpp +++ b/src/middleware/cors.cpp @@ -53,7 +53,10 @@ void expresso::middleware::Cors::allowMethod(std::string method) { std::set::const_iterator methodIter = expresso::enums::methods.find(method); if (methodIter == expresso::enums::methods.end()) { - logger::warning("Invalid CORS method: " + method); + logger::error( + "Invalid CORS method: " + method, + "void expresso::middleware::Cors::allowMethod(std::string method)"); + return; } this->methods.insert(static_cast(