Protect the langs api call with the apiKey

This commit is contained in:
Simon Sickle 2017-09-14 10:22:20 -05:00 committed by GitHub
parent 30068ae7f0
commit d6ca6ec4ee

View File

@ -209,6 +209,11 @@ class Api extends Main
function langs()
{
if (config_item('apikey') != $this->input->get('apikey'))
{
die("Invalid API key\n");
}
$languages = $this->languages->get_languages();
echo json_encode($languages);
}