From 46b48b1d6f88c6f7e9f02feedaf9e0449c30bb66 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Sun, 4 Jul 2021 01:31:43 -0700 Subject: [PATCH] :construction: working on --- src/json_filter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/json_filter.cpp b/src/json_filter.cpp index 8b2b5d1..9d3eec2 100644 --- a/src/json_filter.cpp +++ b/src/json_filter.cpp @@ -6,7 +6,8 @@ void JsonFilter::doFilter(const HttpRequestPtr &req, FilterCallback &&fcb, FilterChainCallback &&fccb) { - if (req->getHeader("Content-Type") == "application/json" && req->getHeader("Accept") == "application/json") + std::string_view content_type = req->getHeader("Content-Type"); + if ((content_type == "application/json" || content_type == "*/*") && req->getHeader("Accept") == "application/json") //probably will need to change to contains() type function rather then equality check { fccb(); return;