diff --git a/api/http.php b/api/http.php index fce841e7e89e8a94ecf6238f66f3469fa25c7de6..14eeecd4f85c008df255cf23a5282d57c30d010d 100644 --- a/api/http.php +++ b/api/http.php @@ -21,7 +21,7 @@ require_once INCLUDE_DIR."class.dispatcher.php"; $dispatcher = patterns('', url_post("^/tickets\.(?P<format>xml|json|email)$", array('api.tickets.php:TicketApiController','create')), url('^/task/', patterns('', - url_get("^cron$", array('api.cron.php:CronApiController', 'execute')) + url_post("^cron$", array('api.cron.php:CronApiController', 'execute')) )) ); diff --git a/setup/scripts/rcron.php b/setup/scripts/rcron.php index fb1d4b1cce34de0de0092f5eb799fec605520480..53c2da007f91ab84007afcc20409b32a8da822ed 100755 --- a/setup/scripts/rcron.php +++ b/setup/scripts/rcron.php @@ -34,6 +34,8 @@ set_time_limit(30); #curl post $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $config['url']); +curl_setopt($ch, CURLOPT_POST, 1); +curl_setopt($ch, CURLOPT_POSTFIELDS, ''); curl_setopt($ch, CURLOPT_USERAGENT, 'osTicket API Client v1.7'); curl_setopt($ch, CURLOPT_HEADER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Expect:', 'X-API-Key: '.$config['key']));