This commit is contained in:
2026-06-12 17:19:26 +08:00
parent a3ebb28ce0
commit 8d2e18c5a4
20 changed files with 3011 additions and 411 deletions
+14
View File
@@ -0,0 +1,14 @@
<?php
/**
* Used by Nginx auth_request. Returns 200 if session valid, 401 otherwise.
* Also returns X-Auth-User header so Tengine can log the authenticated username.
* Deploy to /www/wwwroot/soft_download/auth_check.php
*/
session_start();
if (!empty($_SESSION['soft_download_user'])) {
header('X-Auth-User: ' . $_SESSION['soft_download_user']);
http_response_code(200);
exit;
}
http_response_code(401);
exit;