Compare commits
No commits in common. "f80b9a6b43578764415cc356723ba4f3d1b6b879" and "135dfcb666697c5b7fff30a9f6076b69bc92b888" have entirely different histories.
f80b9a6b43
...
135dfcb666
@ -17,7 +17,6 @@ RewriteCond %{REQUEST_FILENAME} \.
|
|||||||
RewriteRule (.*) ./public/$1 [L]
|
RewriteRule (.*) ./public/$1 [L]
|
||||||
|
|
||||||
# serve all other request as query parameters
|
# serve all other request as query parameters
|
||||||
# RewriteRule (.*) ./public/index.php?url=$1 [L,QSA]
|
RewriteRule (.*) ./public/index.php?url=$1 [L,QSA]
|
||||||
RewriteRule ^(.*?\.php)/([^/]*)/([^/]*)(/.+)? ./public/index.php?url=$1&$2&$3 [NC,N,QSA]
|
|
||||||
|
|
||||||
AddType application/x-httpd-php .php .phtml
|
AddType application/x-httpd-php .php .phtml
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
ini_set( 'display_errors','1');
|
ini_set( 'display_errors','1');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//setup
|
//setup
|
||||||
parse_str($_SERVER['QUERY_STRING'], $params);
|
parse_str($_SERVER['QUERY_STRING'], $params);
|
||||||
if (defined ("BASEDIR")) {
|
if (defined ("BASEDIR")) {
|
||||||
|
@ -10,7 +10,6 @@ $router->setDefault(function(){
|
|||||||
unset($logManager);
|
unset($logManager);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//Pages
|
//Pages
|
||||||
$router->any('/', 'Log');
|
$router->any('/', 'Log');
|
||||||
$router->any('/log', 'Log');
|
$router->any('/log', 'Log');
|
||||||
@ -47,7 +46,6 @@ $router->get('/api/server/log', 'ServerApi@logStatus');
|
|||||||
$router->post('/api/widgets/{widgetId}/run', 'WidgetApi@run');
|
$router->post('/api/widgets/{widgetId}/run', 'WidgetApi@run');
|
||||||
$router->get('/api/widgets/{widgetId}/detail', 'WidgetApi@detail');
|
$router->get('/api/widgets/{widgetId}/detail', 'WidgetApi@detail');
|
||||||
$router->get('/api/widgets/{widgetId}/detail/{period}', 'WidgetApi@detail');
|
$router->get('/api/widgets/{widgetId}/detail/{period}', 'WidgetApi@detail');
|
||||||
$router->post('/api/widgets/{widgetId}/edit', 'WidgetApi@edit');
|
|
||||||
|
|
||||||
//Vue APP - Automations Endpoints
|
//Vue APP - Automations Endpoints
|
||||||
$router->get('/api/automations', 'AutomationsApi@default');
|
$router->get('/api/automations', 'AutomationsApi@default');
|
||||||
@ -63,8 +61,7 @@ $router->post('/cron/automations', 'CronApi@automations');
|
|||||||
|
|
||||||
|
|
||||||
//Google Home - API
|
//Google Home - API
|
||||||
$router->any('/api/HA/auth', 'Oauth@default');
|
$router->any('/api/HA/auth', 'Oauth');
|
||||||
$router->any('/api/HA/token', 'Oauth@token');
|
|
||||||
$router->any('/api/HA', 'GoogleHomeApi@response');
|
$router->any('/api/HA', 'GoogleHomeApi@response');
|
||||||
|
|
||||||
|
|
||||||
@ -74,9 +71,6 @@ $router->any('/api/update/', 'UpdatesApi@default');
|
|||||||
$router->any('/api/users/status', 'UsersApi@status');
|
$router->any('/api/users/status', 'UsersApi@status');
|
||||||
$router->any('/api/users/subscribe', 'UsersApi@subscribe');
|
$router->any('/api/users/subscribe', 'UsersApi@subscribe');
|
||||||
|
|
||||||
//Endpoints API - V2
|
|
||||||
$router->post('/api/v2/endpoint/', 'EndpointsApi@default_v2');
|
|
||||||
$router->post('/api/v2/endpoint/cofiguration', 'EndpointsApi@cofiguration_v2');
|
|
||||||
|
|
||||||
// examples
|
// examples
|
||||||
$router->any('/api/example', 'ExampleApi@example');
|
$router->any('/api/example', 'ExampleApi@example');
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class EndpointsApi extends ApiController
|
class EndpointsApi extends ApiController{
|
||||||
{
|
public function default(){
|
||||||
public function default()
|
|
||||||
{
|
|
||||||
// $this->requireAuth();
|
// $this->requireAuth();
|
||||||
$obj = $this->input;
|
$obj = $this->input;
|
||||||
|
|
||||||
@ -95,7 +93,8 @@ class EndpointsApi extends ApiController
|
|||||||
// Issuing command
|
// Issuing command
|
||||||
if ($command == "null"){
|
if ($command == "null"){
|
||||||
$deviceCommand = $device["command"];
|
$deviceCommand = $device["command"];
|
||||||
if ($deviceCommand != '' && $deviceCommand != null && $deviceCommand != "null") {
|
if ($deviceCommand != '' && $deviceCommand != null && $deviceCommand != "null")
|
||||||
|
{
|
||||||
$command = $deviceCommand;
|
$command = $deviceCommand;
|
||||||
$data = [
|
$data = [
|
||||||
'command'=>'null'
|
'command'=>'null'
|
||||||
@ -194,77 +193,4 @@ class EndpointsApi extends ApiController
|
|||||||
//unset($logManager); //TODO: Opravit
|
//unset($logManager); //TODO: Opravit
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function requireAuth()
|
|
||||||
{
|
|
||||||
if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
|
|
||||||
// TODO: call appropriate class/method
|
|
||||||
$deviceManager = new DeviceManager();
|
|
||||||
list($type, $hash) = explode(' ', $_SERVER['HTTP_AUTHORIZATION']);
|
|
||||||
$this->authenticated = $deviceManager->approved($hash);
|
|
||||||
return $hash;
|
|
||||||
if (!$this->authenticated) {
|
|
||||||
throw new Exception("Authorization required", 401);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw new Exception("Authorization required", 401);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function default_v2()
|
|
||||||
{
|
|
||||||
$token = $this->requireAuth();
|
|
||||||
$obj = $this->input;
|
|
||||||
$response = [];
|
|
||||||
|
|
||||||
$device = DeviceManager::getDeviceByToken($token);
|
|
||||||
DeviceManager::setHeartbeat($device['device_id']);
|
|
||||||
|
|
||||||
// Issue command
|
|
||||||
$deviceCommand = $device["command"];
|
|
||||||
if ($deviceCommand != '' && $deviceCommand != null && $deviceCommand != "null") {
|
|
||||||
$response['command'] = $deviceCommand;
|
|
||||||
DeviceManager::editByToken($obj['token'], ['command' => 'null']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$subDevicesData = SubDeviceManager::getAllSubDevices($device['device_id']);
|
|
||||||
if (count($subDevicesData) > 0) {
|
|
||||||
foreach ($subDevicesData as $key => $subDeviceData) {
|
|
||||||
$subDeviceId = $subDeviceData['subdevice_id'];
|
|
||||||
$subDeviceLastReord = RecordManager::getLastRecord($subDeviceId);
|
|
||||||
if (!empty($subDeviceLastReord)) {
|
|
||||||
$response['values'][$subDeviceData['type']] = $subDeviceLastReord['value'];
|
|
||||||
if ($subDeviceLastReord['execuded'] == 0) {
|
|
||||||
RecordManager::setExecuted($subDeviceLastReord['record_id']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->response($response, 200);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function cofiguration_v2()
|
|
||||||
{
|
|
||||||
$token = $this->requireAuth();
|
|
||||||
$response = [];
|
|
||||||
|
|
||||||
$device = DeviceManager::getDeviceByToken($token);
|
|
||||||
DeviceManager::setHeartbeat($device['device_id']);
|
|
||||||
|
|
||||||
if (!empty($device["name"]) && isset($device["name"])) $response["nettwork"]['hostname'] = $this->nameToHostname($device["name"]);
|
|
||||||
if (!empty($device["ip_address"]) && isset($device["ip_address"])) $response["nettwork"]['ip'] = $device["ip_address"];
|
|
||||||
if (!empty($device["gateway"]) && isset($device["gateway"])) $response["nettwork"]['gateway'] = $device["gateway"];
|
|
||||||
if (!empty($device["dns"]) && isset($device["dns"])) $response["nettwork"]['dns'] = $device["dns"];
|
|
||||||
if (!empty($device["sleep_time"]) && isset($device["sleep_time"])) $response["sleep"] = $device["sleep_time"];
|
|
||||||
|
|
||||||
$this->response($response, 200);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function nameToHostname(string $name = null)
|
|
||||||
{
|
|
||||||
$hostname = "";
|
|
||||||
$hostname = strtolower($name);
|
|
||||||
return str_replace(' ', '_', $hostname);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -134,29 +134,4 @@ class WidgetApi extends ApiController
|
|||||||
}
|
}
|
||||||
return RANGES[''];
|
return RANGES[''];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($subDeviceId)
|
|
||||||
{
|
|
||||||
$this->requireAuth();
|
|
||||||
$allow = ["icon", "name"];
|
|
||||||
|
|
||||||
$response = null;
|
|
||||||
$obj = $this->input;
|
|
||||||
|
|
||||||
foreach ($obj as $key => $value) {
|
|
||||||
if (!in_array($key, $allow)){
|
|
||||||
unset($obj[$key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$subDeviceData = SubDeviceManager::edit($subDeviceId, $obj);
|
|
||||||
|
|
||||||
$response = [
|
|
||||||
"value" => "OK"
|
|
||||||
];
|
|
||||||
|
|
||||||
$this->response($response);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,34 +14,19 @@ if (
|
|||||||
$state = $_POST["state"];
|
$state = $_POST["state"];
|
||||||
$clientId = $_POST["clientId"];
|
$clientId = $_POST["clientId"];
|
||||||
$ota = $userManager->haveOtaEnabled($userName);
|
$ota = $userManager->haveOtaEnabled($userName);
|
||||||
|
|
||||||
if ($ota == "") {
|
if ($ota == "") {
|
||||||
$token = (new AuthManager)->getToken($userName,$userPassword, $clientId);
|
$token = (new AuthManager)->getToken($userName,$userPassword, $clientId);
|
||||||
if (!$token) {
|
if (!$token) {
|
||||||
throw new Exception("Auth failed", 401);
|
throw new Exception("Auth failed", 401);
|
||||||
}
|
}
|
||||||
|
|
||||||
$get=[];
|
|
||||||
if ($_POST['response_type'] = 'code') {
|
|
||||||
$get = [
|
|
||||||
"state"=>$state,
|
|
||||||
"code"=>$token,
|
|
||||||
"access_token"=>$token,
|
|
||||||
"state"=>$state,
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
$get = [
|
$get = [
|
||||||
"access_token"=>$token,
|
"access_token"=>$token,
|
||||||
"token_type"=>"Bearer",
|
"token_type"=>"Bearer",
|
||||||
"state"=>$state,
|
"state"=>$state,
|
||||||
];
|
];
|
||||||
}
|
|
||||||
|
|
||||||
//Log
|
header('Location: ' . $_POST["redirectUrl"] . '#' . http_build_query($get));
|
||||||
$logManager = new LogManager(__DIR__ . '/../../logs/auth/' . date("Y-m-d") . '.log');
|
|
||||||
$logManager->setLevel(LOGLEVEL);
|
|
||||||
$logManager->write("[OAUTH] Response " . $_POST["redirectUrl"] . '?' . http_build_query($get), LogRecordTypes::WARNING);
|
|
||||||
header('Location: ' . $_POST["redirectUrl"] . '?' . http_build_query($get));
|
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
class LogManager
|
class LogManager
|
||||||
{
|
{
|
||||||
private $logFile;
|
private $logFile;
|
||||||
private $filePath = null;
|
|
||||||
private $logLevel = 1;
|
private $logLevel = 1;
|
||||||
|
|
||||||
public function __construct($fileName = "")
|
public function __construct($fileName = "")
|
||||||
@ -16,13 +15,12 @@ class LogManager
|
|||||||
if ($fileName == ""){
|
if ($fileName == ""){
|
||||||
$fileName = '../logs/'. date("Y-m-d").'.log';
|
$fileName = '../logs/'. date("Y-m-d").'.log';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_dir("../logs/"))
|
if(!is_dir("../logs/"))
|
||||||
{
|
{
|
||||||
mkdir("../logs/");
|
mkdir("../logs/");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->filePath = $fileName;
|
$this->logFile = fopen($fileName, "a") or die("Unable to open file!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setLevel($type = LogRecordTypess::WARNING){
|
public function setLevel($type = LogRecordTypess::WARNING){
|
||||||
@ -30,10 +28,6 @@ class LogManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function write($value, $type = LogRecordTypess::ERROR){
|
public function write($value, $type = LogRecordTypess::ERROR){
|
||||||
if ($this->logFile == null) {
|
|
||||||
$this->logFile = fopen($this->filePath, "a") or die("Unable to open file!");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($type['level'] <= $this->logLevel) {
|
if ($type['level'] <= $this->logLevel) {
|
||||||
$record = "[".date("H:m:s")."][".$type['identifier']."]" . $value . "\n";
|
$record = "[".date("H:m:s")."][".$type['identifier']."]" . $value . "\n";
|
||||||
fwrite($this->logFile, $record);
|
fwrite($this->logFile, $record);
|
||||||
|
@ -66,20 +66,6 @@ class SubDeviceManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function edit($subDeviceId, $values)
|
|
||||||
{
|
|
||||||
$record = [];
|
|
||||||
foreach ($values as $key => $value) {
|
|
||||||
$record[$key] = $value;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
Db::edit('subdevices', $record, 'WHERE subdevice_id = ?', array ($subDeviceId));
|
|
||||||
} catch (PDOException $error) {
|
|
||||||
echo $error->getMessage();
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function remove($subDeviceId)
|
public static function remove($subDeviceId)
|
||||||
{
|
{
|
||||||
RecordManager::cleanSubdeviceRecords($subDeviceId);
|
RecordManager::cleanSubdeviceRecords($subDeviceId);
|
||||||
@ -92,7 +78,7 @@ class SubDeviceManager
|
|||||||
|
|
||||||
//TODO: @Patrik Check line 89
|
//TODO: @Patrik Check line 89
|
||||||
$rows = Db::loadAll("
|
$rows = Db::loadAll("
|
||||||
SELECT d.room_id, d.sleep_time, sd.subdevice_id, sd.device_id, COALESCE(sd.icon, d.icon) AS icon, COALESCE(sd.name, d.name) AS name, sd.type, sd.unit, r.value, r.time FROM subdevices sd
|
SELECT d.room_id, d.sleep_time, sd.subdevice_id, sd.device_id, d.icon, d.name, sd.type, sd.unit, r.value, r.time FROM subdevices sd
|
||||||
JOIN devices d ON sd.device_id = d.device_id
|
JOIN devices d ON sd.device_id = d.device_id
|
||||||
JOIN records r ON r.subdevice_id = sd.subdevice_id
|
JOIN records r ON r.subdevice_id = sd.subdevice_id
|
||||||
WHERE d.room_id IN (" . str_repeat("?,", count($roomIds) - 1) . "?)
|
WHERE d.room_id IN (" . str_repeat("?,", count($roomIds) - 1) . "?)
|
||||||
|
@ -1,18 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
//https://developers.google.com/oauthplayground/
|
class Oauth extends Template
|
||||||
//https://developer.okta.com/blog/2018/04/10/oauth-authorization-code-grant-type
|
|
||||||
|
|
||||||
class Oauth
|
|
||||||
{
|
{
|
||||||
function default()
|
function __construct()
|
||||||
{
|
{
|
||||||
//Log
|
|
||||||
$logManager = new LogManager(__DIR__ . '/../../logs/auth/' . date("Y-m-d") . '.log');
|
|
||||||
$logManager->setLevel(LOGLEVEL);
|
|
||||||
$logManager->write("[OAUTH] GET " . json_encode($_GET), LogRecordTypes::INFO);
|
|
||||||
$logManager->write("[OAUTH] DATA " . file_get_contents('php://input'), LogRecordTypes::INFO);
|
|
||||||
$logManager->write("[OAUTH] URL " . $_SERVER['REQUEST_URI'], LogRecordTypes::INFO);
|
|
||||||
|
|
||||||
$userManager = new UserManager ();
|
$userManager = new UserManager ();
|
||||||
$langMng = new LanguageManager('en');
|
$langMng = new LanguageManager('en');
|
||||||
|
|
||||||
@ -21,13 +11,6 @@ class Oauth
|
|||||||
$template->prepare('baseUrl', BASEURL);
|
$template->prepare('baseUrl', BASEURL);
|
||||||
$template->prepare('title', 'Simple Home - Oauth');
|
$template->prepare('title', 'Simple Home - Oauth');
|
||||||
|
|
||||||
if (isset($_GET['response_type']) && $_GET['response_type'] == 'code') {
|
|
||||||
$template->prepare('responseType', $_GET['response_type']);
|
|
||||||
$template->prepare('redirectUrl', $_GET['redirect_uri']);
|
|
||||||
$template->prepare('clientId', $_GET['client_id']);
|
|
||||||
$template->prepare('scope', $_GET['scope']);
|
|
||||||
$template->prepare('state', $_GET['state']);
|
|
||||||
} else {
|
|
||||||
if (isset($_GET['redirect_uri'])) {
|
if (isset($_GET['redirect_uri'])) {
|
||||||
$template->prepare('responseType', $_GET['response_type']);
|
$template->prepare('responseType', $_GET['response_type']);
|
||||||
$template->prepare('redirectUrl', $_GET['redirect_uri']);
|
$template->prepare('redirectUrl', $_GET['redirect_uri']);
|
||||||
@ -39,37 +22,7 @@ class Oauth
|
|||||||
$template->prepare('clientId', $_POST['clientId']);
|
$template->prepare('clientId', $_POST['clientId']);
|
||||||
$template->prepare('state', $_POST['state']);
|
$template->prepare('state', $_POST['state']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$template->render();
|
$template->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
function token()
|
|
||||||
{
|
|
||||||
//Log
|
|
||||||
$logManager = new LogManager(__DIR__ . '/../../logs/auth/' . date("Y-m-d") . '.log');
|
|
||||||
$logManager->setLevel(LOGLEVEL);
|
|
||||||
$logManager->write("[OAUTH] GET " . json_encode($_GET), LogRecordTypes::INFO);
|
|
||||||
$logManager->write("[OAUTH] POST " . json_encode($_POST), LogRecordTypes::INFO);
|
|
||||||
$logManager->write("[OAUTH] DATA " . file_get_contents('php://input'), LogRecordTypes::INFO);
|
|
||||||
$logManager->write("[OAUTH] URL " . $_SERVER['REQUEST_URI'], LogRecordTypes::INFO);
|
|
||||||
|
|
||||||
// $template = new Template('oauth');
|
|
||||||
// $template->prepare('baseDir', BASEDIR);
|
|
||||||
// $template->prepare('baseUrl', BASEURL);
|
|
||||||
// $template->prepare('title', 'Simple Home - Oauth');
|
|
||||||
// $template->render();
|
|
||||||
|
|
||||||
$token = $_POST["code"];
|
|
||||||
$get = [
|
|
||||||
"access_token" => $token,
|
|
||||||
"token_type" => "bearer",
|
|
||||||
"refresh_token" => $token,
|
|
||||||
"scope" => 'user',
|
|
||||||
];
|
|
||||||
|
|
||||||
$logManager->write("[OAUTH] Response " . json_encode($get), LogRecordTypes::INFO);
|
|
||||||
echo json_encode($get);
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$partial = new Partial('head');
|
$partial = new Partial('head');
|
||||||
$partial->prepare('baseDir',$BASEDIR);
|
$partial->prepare('baseDir',$BASEDIR);
|
||||||
$partial->prepare('baseUrl',$BASEURL);
|
|
||||||
$partial->render();
|
$partial->render();
|
||||||
?>
|
?>
|
||||||
<title><?php echo $TITLE ?></title>
|
<title><?php echo $TITLE ?></title>
|
||||||
|
@ -7,12 +7,10 @@ class Template{
|
|||||||
|
|
||||||
function __construct($path = "", $debug = false) {
|
function __construct($path = "", $debug = false) {
|
||||||
$this->debug = $debug;
|
$this->debug = $debug;
|
||||||
|
if (!empty('../app/views/templates/' . $path . '.phtml') && file_exists('../app/views/templates/' . $path . '.phtml')) {
|
||||||
if (!empty(__DIR__ . '/../app/views/templates/' . $path . '.phtml') && file_exists(__DIR__ . '/../app/views/templates/' . $path . '.phtml')) {
|
|
||||||
$this->path = $path;
|
$this->path = $path;
|
||||||
} else {
|
} else {
|
||||||
echo '<pre>';
|
echo '<pre>';
|
||||||
echo __DIR__ . '/../app/views/templates/' . $path . '.phtml</br>';
|
|
||||||
echo 'PHTML: Template File ' . $path . ' not found';
|
echo 'PHTML: Template File ' . $path . ' not found';
|
||||||
echo '</pre>';
|
echo '</pre>';
|
||||||
die();
|
die();
|
||||||
@ -28,9 +26,9 @@ class Template{
|
|||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
extract($this->assignedValues);
|
extract($this->assignedValues);
|
||||||
if (!empty(__DIR__ . '/../app/controllers/' . $this->path . 'Controller.php') && file_exists(__DIR__ . '/../app/controllers/' . $this->path . 'Controller.php')) {
|
if (!empty('../app/controllers/' . $this->path . 'Controller.php') && file_exists('../app/controllers/' . $this->path . 'Controller.php')) {
|
||||||
include(__DIR__ . '/../app/controllers/' . $this->path . 'Controller.php');
|
include('../app/controllers/' . $this->path . 'Controller.php');
|
||||||
}
|
}
|
||||||
require_once(__DIR__ . '/../app/views/templates/' . $this->path . '.phtml');
|
require_once('../app/views/templates/' . $this->path . '.phtml');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ RewriteCond %{REQUEST_FILENAME} !-f
|
|||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !.css
|
RewriteCond %{REQUEST_FILENAME} !.css
|
||||||
RewriteCond %{REQUEST_FILENAME} !.js
|
RewriteCond %{REQUEST_FILENAME} !.js
|
||||||
RewriteRule (.*) ./index.php?url=$1 [QSA,L]
|
RewriteRule (.*) ./index.php?url=$1#$2 [QSA,L]
|
||||||
|
|
||||||
#token to HTTP_AUTHORIZATION
|
#token to HTTP_AUTHORIZATION
|
||||||
RewriteCond %{HTTP:Authorization} ^(.*)
|
RewriteCond %{HTTP:Authorization} ^(.*)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../app/Bootstrap.php';
|
require_once __DIR__ . '/../app/Bootstrap.php';
|
Loading…
Reference in New Issue
Block a user