Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences
C++ algoliadatastoreelasticsearchenterprise-searchfacetingfull-text-searchfuzzy-searchgeosearchin-memoryinstantsearchmerchandisingpineconesearchsearch-enginesemantic-searchsimilarity-searchsite-searchsynonymstypo-tolerancevector-search
Restrict 4K query length check to only search endpoint.
Kishore Nalland6414c155ee8
diff --git a/src/http_server.cpp b/src/http_server.cppindex 1a9d4a5d..518d3175 100644--- a/src/http_server.cpp+++ b/src/http_server.cpp@@ -341,7 +341,7 @@ int HttpServer::catch_all_handler(h2o_handler_t *_h2o_handler, h2o_req_t *req) {h2o_iovec_init(req->path.base + req->query_at, req->path.len - req->query_at) :h2o_iovec_init(H2O_STRLIT(""));- if(query.len > 4000) {+ if(query.len > 4000 && http_method == "GET" && !path_parts.empty() && path_parts.back() == "search") {nlohmann::json resp;resp["message"] = "Query string exceeds max allowed length of 4000. Use the /multi_search end-point for larger payloads.";return send_response(req, 400, resp.dump());