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(