[httpd] Add PUT and DELETE to the allowed http request methods

This commit is contained in:
chme 2018-02-09 18:26:37 +01:00
parent cdaa929078
commit d4b05e98ae

View File

@ -1687,7 +1687,7 @@ httpd_init(const char *webroot)
if (allow_origin)
{
if (strlen(allow_origin) != 0)
evhttp_set_allowed_methods(evhttpd, EVHTTP_REQ_GET | EVHTTP_REQ_POST | EVHTTP_REQ_HEAD | EVHTTP_REQ_OPTIONS);
evhttp_set_allowed_methods(evhttpd, EVHTTP_REQ_GET | EVHTTP_REQ_POST | EVHTTP_REQ_PUT | EVHTTP_REQ_DELETE | EVHTTP_REQ_HEAD | EVHTTP_REQ_OPTIONS);
else
allow_origin = NULL;
}