Simplify EzServer menu and serve original Web Console

This commit is contained in:
SantaSpeen committed 2026-11-22 03:12:27 +03:00
1 parent ee7e18490f
commit d748f7cc69
16 files changed
+290 -245

No files matched your search

+4 -2
View File
@@ -1,6 +1,6 @@
<?php
// Launch the original API front controller for the verified, database-independent routes.
// Launch the original API front controller for the verified routes.
function failRequest($status, $message)
{
http_response_code($status);
@@ -28,7 +28,9 @@ if ($path === '/') {
return;
}
if (!preg_match('~\A/api(?:/index\.php)?(?:/v1/(?:auth/ping|info/(?:versions|versionsbyname)))?/?\z~i', $path ?? '')) {
$patientLookup = getenv('EZSERVER_SQLITE')
&& preg_match('~\A/api(?:/index\.php)?/v1/e2ds/patientsbychartno/?\z~i', $path ?? '');
if (!$patientLookup && !preg_match('~\A/api(?:/index\.php)?(?:/v1/(?:auth/ping|info/(?:versions|versionsbyname)))?/?\z~i', $path ?? '')) {
failRequest(404, 'Route is unavailable in the macOS preview');
return;
}