[Web] Fix slow UI by switching QR provider and only generating qr image on demand
This commit is contained in:
13
data/web/inc/ajax/qr_gen.php
Normal file
13
data/web/inc/ajax/qr_gen.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
|
||||
header('Content-Type: text/plain');
|
||||
if (!isset($_SESSION['mailcow_cc_role'])) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if (isset($_GET['token']) && ctype_alnum($_GET['token'])) {
|
||||
echo $tfa->getQRCodeImageAsDataUri($_SESSION['mailcow_cc_username'], $totp_secret);
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user