Because we only respond error when "allowed_methods" does not contain method requested. With "cgi_methods" we just tell the Webserver when to call fork etc for cgi`s.
Example:
location /scripts
{
allowed_methods GET POST;
cgi_methods POST;
}
when we call GET on uri="/scripts/upload.py" we just get the source code. but on POST we trigger cgi.
when
{
...
cgi_methods GET;
...
}
and we do POST on uri="/scripts/upload.py" its the same as if we do POST on "/index.html".
Because we only respond error when "allowed_methods" does not contain method requested. With "cgi_methods" we just tell the Webserver when to call fork etc for cgi`s.
Example:
when we call GET on uri="/scripts/upload.py" we just get the source code. but on POST we trigger cgi.
when
and we do POST on uri="/scripts/upload.py" its the same as if we do POST on "/index.html".