mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-31 06:01:52 +00:00
fix(userspace/falco): accept 'Content-Type' header that contains "application/json", but it is not strictly equal to it.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
parent
9dcd8bccac
commit
b359f71511
@ -150,7 +150,7 @@ bool k8s_audit_handler::handlePost(CivetServer *server, struct mg_connection *co
|
||||
// Ensure that the content-type is application/json
|
||||
const char *ct = server->getHeader(conn, string("Content-Type"));
|
||||
|
||||
if(ct == NULL || string(ct) != "application/json")
|
||||
if(ct == NULL || strstr(ct, "application/json") == NULL)
|
||||
{
|
||||
mg_send_http_error(conn, 400, "Wrong Content Type");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user