Skip to content

Commit 5a3b13f

Browse files
authored
Merge pull request #107 from coding-cpp/fix/104
cors allowMethod invalid return
2 parents 786a607 + 2c7519c commit 5a3b13f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/middleware/cors.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ void expresso::middleware::Cors::allowMethod(std::string method) {
5353
std::set<std::string>::const_iterator methodIter =
5454
expresso::enums::methods.find(method);
5555
if (methodIter == expresso::enums::methods.end()) {
56-
logger::warning("Invalid CORS method: " + method);
56+
logger::error(
57+
"Invalid CORS method: " + method,
58+
"void expresso::middleware::Cors::allowMethod(std::string method)");
59+
return;
5760
}
5861

5962
this->methods.insert(static_cast<expresso::enums::method>(

0 commit comments

Comments
 (0)