forked from projects/fipamo
Quick patch for CORS check while in init state
This commit is contained in:
commit
3c3f2a0881
1 changed files with 48 additions and 43 deletions
|
@ -4,6 +4,8 @@ class handleCors
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
//look to see if settings file exists. kinda important
|
||||||
|
if (file_exists("../config/settings.json")) {
|
||||||
//check settings to see if external api access is allowed
|
//check settings to see if external api access is allowed
|
||||||
$config = new Settings();
|
$config = new Settings();
|
||||||
$settings = $config->getSettings();
|
$settings = $config->getSettings();
|
||||||
|
@ -47,5 +49,8 @@ class handleCors
|
||||||
//value doesn't exist, so whatevs
|
//value doesn't exist, so whatevs
|
||||||
//echo "API ACCESS VALUE NOT PRESENT";
|
//echo "API ACCESS VALUE NOT PRESENT";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
//init state, so chill
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue