Update API URL to be dynamic
This commit is contained in:
@@ -424,7 +424,11 @@ if (!isset($_SESSION['admin_logged_in']) || $_SESSION['admin_logged_in'] !== tru
|
||||
</div>
|
||||
|
||||
<div class="api-url" id="apiUrl">
|
||||
https://yourdomain.com/api/app.php
|
||||
<?php
|
||||
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";
|
||||
$host = $_SERVER['HTTP_HOST'];
|
||||
echo $protocol . "://" . $host . "/api";
|
||||
?>
|
||||
</div>
|
||||
<button class="copy-btn" onclick="copyApiUrl()">📋 Kopyala</button>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user