Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Added Content-type: application/vnd.api+json (#513)
Browse files Browse the repository at this point in the history
The content should be well formed JSON and it will make NAXSI not complain about Unknown Format.
Can help many other users.
  • Loading branch information
marcinguy authored Sep 9, 2020
1 parent dd9ff12 commit 4ea2af9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions naxsi_src/naxsi_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 4ea2af9

Please # to comment.