<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: Authorization");
header('Content-Type: application/json');

if(!defined('APPLICATION_VERSION')){
    die("Permission denied!");
}

if($_SERVER['REQUEST_METHOD'] === 'OPTIONS'){
    header('Access-Control-Max-Age: ' . JWT_MAX_LIFE);
    header('Access-Control-Allow-Methods: OPTIONS, GET, POST');
    die();
}

$route::call($module, $controller, $action);
?>
