initial commit
This commit is contained in:
11
auth/whoami.php
Normal file
11
auth/whoami.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
$user = $_SERVER['REMOTE_USER'] ?? null;
|
||||
if (!$user) {
|
||||
http_response_code(401);
|
||||
echo json_encode(['error'=>'no-user']);
|
||||
exit;
|
||||
}
|
||||
|
||||
echo json_encode(['user' => $user]);
|
||||
Reference in New Issue
Block a user