Disable CSRF check for REST API

This allow to do POST requests from another website.
This commit is contained in:
jfefe 2016-11-22 23:41:46 +01:00
parent 5b49b7bca0
commit 3830c405a8

View File

@ -26,6 +26,7 @@
*
*/
if (! defined("NOLOGIN")) define("NOLOGIN",'1');
if (! defined("NOCSRFCHECK")) define("NOCSRFCHECK",'1');
$res=0;
if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php';
@ -142,7 +143,3 @@ foreach ($modulesdir as $dir)
// Call API (we suppose we found it)
$api->r->handle();