Update: 2026-05-15 17:55:39
This commit is contained in:
@@ -367,7 +367,7 @@ foreach ($invoices as $invIdx => $inv) {
|
||||
|
||||
// --- Add Verification QR Code ---
|
||||
try {
|
||||
$verifyUrl = "https://musadaq.intaleqapp.com/v.php?id=" . $inv['id'];
|
||||
$verifyUrl = "https://musadaq.intaleqapp.com/verify?id=" . $inv['id'];
|
||||
$qrApiUrl = "https://api.qrserver.com/v1/create-qr-code/?size=100x100&data=" . urlencode($verifyUrl);
|
||||
$qrData = $downloadUrl($qrApiUrl);
|
||||
if ($qrData) {
|
||||
|
||||
@@ -20,6 +20,7 @@ if (file_exists($envFile)) {
|
||||
use App\Core\Database;
|
||||
use App\Core\Encryption;
|
||||
|
||||
header_remove("Content-Security-Policy");
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
|
||||
header('Pragma: no-cache');
|
||||
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
|
||||
|
||||
@@ -3,16 +3,19 @@
|
||||
* Simple Router & Entry Point
|
||||
*/
|
||||
|
||||
// 1. Load Bootstrap
|
||||
require_once __DIR__ . '/../app/bootstrap/init.php';
|
||||
|
||||
// Global Request Logging (non-sensitive)
|
||||
error_log("Incoming Request: " . ($_SERVER['REQUEST_METHOD'] ?? 'GET') . " " . ($_SERVER['REQUEST_URI'] ?? '/'));
|
||||
|
||||
// Public Verification Bypass (Top Priority)
|
||||
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||
$route = $_GET['route'] ?? str_replace('/api/', '', $uri);
|
||||
$route = trim($route, '/');
|
||||
|
||||
error_log("Router: Resolved route '{$route}'");
|
||||
if ($route === 'verify' || $route === 'v.php') {
|
||||
$id = $_GET['id'] ?? null;
|
||||
require_once APP_PATH . '/modules_app/invoices/verify_public.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
// Route map: route => [allowed_method, module_file]
|
||||
$routes = [
|
||||
|
||||
@@ -3039,7 +3039,7 @@
|
||||
getQrSrc(inv) {
|
||||
if (!inv) return '';
|
||||
if (inv.jofotara?.qr_image_uri) return inv.jofotara.qr_image_uri;
|
||||
const verifyUrl = `https://musadaq.intaleqapp.com/v.php?id=${inv.id}`;
|
||||
const verifyUrl = `https://musadaq.intaleqapp.com/verify?id=${inv.id}`;
|
||||
const qr = new QRious({ value: verifyUrl, size: 300, level: 'H' });
|
||||
return qr.toDataURL();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user