mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 04:21:17 -05:00
#102: possibility to set API key
This commit is contained in:
parent
5341c7901d
commit
9804cb15ee
@ -105,6 +105,15 @@ $config['backup_pass'] = '';
|
||||
**/
|
||||
$config['per_page'] = 15;
|
||||
|
||||
/**
|
||||
* API key
|
||||
*
|
||||
* Require a key to interact with the API.
|
||||
* Append to all API requests: ?apikey=[yourkey]
|
||||
*
|
||||
**/
|
||||
$config['apikey'] = '';
|
||||
|
||||
/**
|
||||
* Anti spam
|
||||
*
|
||||
|
@ -25,6 +25,11 @@ class Api extends Main
|
||||
{
|
||||
die("The API has been disabled\n");
|
||||
}
|
||||
|
||||
if (config_item('apikey') != $this->input->get('apikey'))
|
||||
{
|
||||
die("Invalid API key\n");
|
||||
}
|
||||
}
|
||||
|
||||
function index()
|
||||
|
Loading…
x
Reference in New Issue
Block a user