Update index.php

This commit is contained in:
Namhyeon Go 2019-06-04 15:35:34 +09:00 committed by GitHub
parent 33b9d96802
commit 8b99d3d803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,9 @@ define("_DEF_RSF_", true); // compatible to RSF
define("APP_DEVELOPMENT", false); // set the status of development
define("DOC_EOL", "\r\n"); // set the 'end of line' commonly
define("CORS_DOMAINS", false); // allow origin domains
define("PHP_FIREWALL_REQUEST_URI", false); // only for sponsors
define("PHP_FIREWALL_ACTIVATION", false); // only for sponsors
define("PHP_DDOS_PROTECTION", true); // only for sponsors
// check if current status is development
if(APP_DEVELOPMENT == true) {
@ -95,6 +98,16 @@ write_visit_log();
// get requested route
$route = read_route();
// set PHP firewall (only for sponsors)
if(PHP_FIREWALL_ACTIVATION !== false) {
loadHelper("php-firewall.lnk");
}
// set DDOS protection (only for sponsors)
IF(PHP_DDOS_PROTECTION !== false) {
loadHelper("php-ddos-shield.lnk");
}
// load route file
if(!loadRoute($route, $scope)) {
loadRoute("errors/404", $scope);