I am making posts like this:
curl 'http://localhost/api.php' -H 'Content-Type: application/json' --data 'names=[{"name":"name"}]'
Which results in the post data being deleted.
If I remove the content-type header, e.g.
curl 'http://localhost/api.php' --data 'names=[{"name":"name"}]'
The post data is present.
The Nginx congiuraiton consists of this:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/;
server_name _;
location ~ \.php$
{
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location / {
try_files $uri $uri/ =404;
index index.html;
autoindex on;
}
}
Does anyone have any insight into why this is?