JSON API: Only do the work on GET requests.
This commit is contained in:
parent
e7acf29df9
commit
63355e98e7
|
@ -72,6 +72,12 @@ int main(int /*argc*/, char * /*argv*/[])
|
|||
|
||||
cout << "Content-Type: application/json\r\n\r\n";
|
||||
|
||||
char *env{getenv("REQUEST_METHOD")};
|
||||
if (env != nullptr && string(env) != "GET")
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
git::init(true);
|
||||
|
||||
bool remove_lockfile{false};
|
||||
|
|
Reference in New Issue