summaryrefslogtreecommitdiff
path: root/static/api
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-11-08 18:20:51 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-11-08 18:20:51 +0900
commit1971a230ac3c9da5121a0d5f8b0cd89626821dee (patch)
treedc3056d7b024753d30fc0c101879274e14dbe2cf /static/api
parent4624de8087752e580b34c8c33ab5d1bdf20b378a (diff)
modified recordings/recordings-plain.html, created api/
Diffstat (limited to 'static/api')
-rw-r--r--static/api/whoami.php11
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]);
+?>