<div dir="ltr">File uploads are passed in the request body, not the headers so you cannot disable or otherwise affect them by setting HTTP_X variables. This is a job for your backend as nginx does not really interact with post body contents.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 30, 2016 at 1:54 AM, c0nw0nk <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Christos Chatzaras Wrote:<br>
------------------------------<wbr>-------------------------<br>
<div><div class="h5">> Is any way to get the body of a php post upload to match using regex<br>
> the filename of a php upload? I want to block file uploads with .php<br>
> extension. I found that I can do it with nasxi but I want to see if I<br>
> can avoid it.<br>
> ______________________________<wbr>_________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
<br>
<br>
</div></div>To disable cookies i do this.<br>
<br>
fastcgi_param HTTP_COOKIE "";<br>
<br>
PHP accepts the following server vars.<br>
<br>
<a href="http://php.net/manual/en/reserved.variables.php" rel="noreferrer" target="_blank">http://php.net/manual/en/<wbr>reserved.variables.php</a><br>
<br>
It says file uploads are files so it would be this<br>
<br>
fastcgi_param HTTP_FILES "";<br>
<br>
But if that does not work you may need to do.<br>
<br>
fastcgi_param HTTP_POST "";<br>
<br>
Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,269253,269280#msg-269280" rel="noreferrer" target="_blank">https://forum.nginx.org/read.<wbr>php?2,269253,269280#msg-269280</a><br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>