c
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user