forked from artefactual/atom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqubit_dev.php
More file actions
19 lines (14 loc) · 750 Bytes
/
qubit_dev.php
File metadata and controls
19 lines (14 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
// This check prevents access to debug front controllers that are deployed by
// accident to production servers. Feel free to remove this, extend it or make
// something more sophisticated.
$allowedIps = ['127.0.0.1', '::1'];
if (false !== $envIp = getenv('ATOM_DEBUG_IP')) {
$allowedIps = array_merge($allowedIps, array_filter(explode(',', $envIp)));
}
if (!in_array(@$_SERVER['REMOTE_ADDR'], $allowedIps)) {
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
require_once dirname(__FILE__).'/config/ProjectConfiguration.class.php';
$configuration = ProjectConfiguration::getApplicationConfiguration('qubit', 'dev', true);
sfContext::createInstance($configuration)->dispatch();