diff --git a/filters/controllers_valid_json.cc b/filters/controllers_valid_json.cc index fa44442..0553aa9 100644 --- a/filters/controllers_valid_json.cc +++ b/filters/controllers_valid_json.cc @@ -8,6 +8,12 @@ void valid_json::doFilter(const HttpRequestPtr &req, FilterCallback &&fcb, FilterChainCallback &&fccb) { + if(req->getMethod() == Options) + { + fccb(); + return; + } + Json::Value body = *req->jsonObject(); bool is_valid = true; diff --git a/filters/json_required.cc b/filters/json_required.cc index c384bb9..6b10bfc 100644 --- a/filters/json_required.cc +++ b/filters/json_required.cc @@ -7,6 +7,11 @@ void json_required::doFilter(const HttpRequestPtr &req, FilterCallback &&fcb, FilterChainCallback &&fccb) { + if(req->getMethod() == Options) + { + fccb(); + return; + } // TODO remove this workaround HttpMethod original_method = req->getMethod(); diff --git a/filters/relays_valid_json.cc b/filters/relays_valid_json.cc index 4c6d736..1d57b1f 100644 --- a/filters/relays_valid_json.cc +++ b/filters/relays_valid_json.cc @@ -8,6 +8,12 @@ void valid_json::doFilter(const HttpRequestPtr &req, FilterCallback &&fcb, FilterChainCallback &&fccb) { + if(req->getMethod() == Options) + { + fccb(); + return; + } + Json::Value body = *req->jsonObject(); bool is_valid = true; diff --git a/filters/schedules_valid_json.cc b/filters/schedules_valid_json.cc index 669d4ec..da49d03 100644 --- a/filters/schedules_valid_json.cc +++ b/filters/schedules_valid_json.cc @@ -7,6 +7,12 @@ void valid_json::doFilter(const HttpRequestPtr &req, FilterCallback &&fcb, FilterChainCallback &&fccb) { + if(req->getMethod() == Options) + { + fccb(); + return; + } + Json::Value body = *req->jsonObject(); bool is_valid = true;