asdasd
This commit is contained in:
17
custom/apps/fx-rates/api/index.php
Normal file
17
custom/apps/fx-rates/api/index.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once dirname(__DIR__) . '/bootstrap.php';
|
||||
|
||||
$requestUri = (string) ($_SERVER['REQUEST_URI'] ?? '');
|
||||
$requestPath = (string) (parse_url($requestUri, PHP_URL_PATH) ?: '');
|
||||
$prefix = '/api/fx-rates/index.php/';
|
||||
$relativePath = trim((string) ($_GET['path'] ?? ''), '/');
|
||||
|
||||
if ($relativePath === '') {
|
||||
$relativePath = str_starts_with($requestPath, $prefix)
|
||||
? substr($requestPath, strlen($prefix))
|
||||
: ltrim((string) ($_SERVER['PATH_INFO'] ?? ''), '/');
|
||||
}
|
||||
|
||||
(new Modules\FxRates\Api\Router(dirname(__DIR__)))->handle($relativePath);
|
||||
Reference in New Issue
Block a user