diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-11-08 18:20:51 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-11-08 18:20:51 +0900 |
| commit | 1971a230ac3c9da5121a0d5f8b0cd89626821dee (patch) | |
| tree | dc3056d7b024753d30fc0c101879274e14dbe2cf /static/api | |
| parent | 4624de8087752e580b34c8c33ab5d1bdf20b378a (diff) | |
modified recordings/recordings-plain.html, created api/
Diffstat (limited to 'static/api')
| -rw-r--r-- | static/api/whoami.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/static/api/whoami.php b/static/api/whoami.php new file mode 100644 index 0000000..f32cd2c --- /dev/null +++ b/static/api/whoami.php @@ -0,0 +1,11 @@ +<?php +// Return current authenticated user from nginx +header('Content-Type: application/json'); +header('Access-Control-Allow-Origin: *'); +header('Access-Control-Allow-Credentials: true'); + +// nginx에서 전달된 사용자 정보 읽기 (X-Auth-User 헤더 또는 REMOTE_USER) +$user = $_SERVER['HTTP_X_AUTH_USER'] ?? $_SERVER['REMOTE_USER'] ?? ''; + +echo json_encode(['user' => $user]); +?> |
