From 4ea2af936f568fe4007bde514917d6bf0832ad3e Mon Sep 17 00:00:00 2001 From: Marcin Kozlowski Date: Wed, 9 Sep 2020 10:23:03 +0200 Subject: [PATCH] Added Content-type: application/vnd.api+json (#513) The content should be well formed JSON and it will make NAXSI not complain about Unknown Format. Can help many other users. --- naxsi_src/naxsi_runtime.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/naxsi_src/naxsi_runtime.c b/naxsi_src/naxsi_runtime.c index 4b85ee6c..dade70ad 100644 --- a/naxsi_src/naxsi_runtime.c +++ b/naxsi_src/naxsi_runtime.c @@ -2334,6 +2334,11 @@ ngx_http_dummy_body_parse(ngx_http_request_ctx_t *ctx, (u_char *) "application/json", 16)) { ngx_http_dummy_json_parse(ctx, r, full_body, full_body_len); } + /* 24 = echo -n "application/vnd.api+json" | wc -c */ + else if (!ngx_strncasecmp(r->headers_in.content_type->value.data, + (u_char *) "application/vnd.api+json", 24)) { + ngx_http_dummy_json_parse(ctx, r, full_body, full_body_len); + } /* 22 = echo -n "application/csp-report" | wc -c */ else if (!ngx_strncasecmp(r->headers_in.content_type->value.data, (u_char *) "application/csp-report", 22)) {