Skip to content

Commit

Permalink
cors allowMethod invalid return
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadit19 committed Oct 7, 2024
1 parent 786a607 commit 2c7519c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/middleware/cors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ void expresso::middleware::Cors::allowMethod(std::string method) {
std::set<std::string>::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<expresso::enums::method>(
Expand Down

0 comments on commit 2c7519c

Please sign in to comment.