asdsad
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
|
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
|
||||||
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? '', '/');
|
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? '', '/');
|
||||||
$assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
|
$assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
|
||||||
|
$debugRedirect = isset($_GET['debug_redirect']);
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
@@ -12,6 +13,9 @@ $assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
|
|||||||
<script>document.documentElement.classList.add('auth-pending');</script>
|
<script>document.documentElement.classList.add('auth-pending');</script>
|
||||||
<style>html.auth-pending body{visibility:hidden;}</style>
|
<style>html.auth-pending body{visibility:hidden;}</style>
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<?php if ($debugRedirect): ?>
|
||||||
|
<script src="<?= $assetBase ?>/assets/js/debug-location.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
|
||||||
|
<?php endif; ?>
|
||||||
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/admin.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/admin.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
||||||
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/toast.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/toast.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
|
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
|
||||||
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? '', '/');
|
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? '', '/');
|
||||||
$assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
|
$assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
|
||||||
|
$debugRedirect = isset($_GET['debug_redirect']);
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
@@ -12,6 +13,9 @@ $assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
|
|||||||
<script>document.documentElement.classList.add('auth-pending');</script>
|
<script>document.documentElement.classList.add('auth-pending');</script>
|
||||||
<style>html.auth-pending body{visibility:hidden;}</style>
|
<style>html.auth-pending body{visibility:hidden;}</style>
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<?php if ($debugRedirect): ?>
|
||||||
|
<script src="<?= $assetBase ?>/assets/js/debug-location.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
|
||||||
|
<?php endif; ?>
|
||||||
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/admin.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/admin.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
||||||
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/toast.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/toast.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
|
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
|
||||||
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? '', '/');
|
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? '', '/');
|
||||||
$assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
|
$assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
|
||||||
|
$debugRedirect = isset($_GET['debug_redirect']);
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
@@ -12,6 +13,9 @@ $assetBase = $appBaseUrl !== '' ? $appBaseUrl : '';
|
|||||||
<script>document.documentElement.classList.add('auth-pending');</script>
|
<script>document.documentElement.classList.add('auth-pending');</script>
|
||||||
<style>html.auth-pending body{visibility:hidden;}</style>
|
<style>html.auth-pending body{visibility:hidden;}</style>
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<?php if ($debugRedirect): ?>
|
||||||
|
<script src="<?= $assetBase ?>/assets/js/debug-location.js?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>"></script>
|
||||||
|
<?php endif; ?>
|
||||||
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/admin.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/admin.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
||||||
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/toast.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
<link rel="stylesheet" href="<?= $assetBase ?>/assets/css/toast.css?v=<?= htmlspecialchars($assetVersion, ENT_QUOTES) ?>">
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
40
public/assets/js/debug-location.js
Normal file
40
public/assets/js/debug-location.js
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
(() => {
|
||||||
|
if (window.__debugRedirectHooked) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.__debugRedirectHooked = true;
|
||||||
|
|
||||||
|
const logRedirect = (label, value) => {
|
||||||
|
try {
|
||||||
|
console.trace('[redirect-debug]', label, value);
|
||||||
|
} catch (err) {
|
||||||
|
console.log('[redirect-debug]', label, value, err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const locationProto = Object.getPrototypeOf(window.location);
|
||||||
|
const hrefDescriptor = Object.getOwnPropertyDescriptor(locationProto, 'href');
|
||||||
|
|
||||||
|
if (hrefDescriptor && hrefDescriptor.configurable) {
|
||||||
|
Object.defineProperty(locationProto, 'href', {
|
||||||
|
configurable: true,
|
||||||
|
enumerable: false,
|
||||||
|
get() {
|
||||||
|
return hrefDescriptor.get.call(this);
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
logRedirect('href =', value);
|
||||||
|
return hrefDescriptor.set.call(this, value);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
['assign', 'replace'].forEach(method => {
|
||||||
|
if (typeof window.location[method] !== 'function') return;
|
||||||
|
const original = window.location[method].bind(window.location);
|
||||||
|
window.location[method] = function (value) {
|
||||||
|
logRedirect(`${method}()`, value);
|
||||||
|
return original(value);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
})();
|
||||||
Reference in New Issue
Block a user