andre 8 月之前
父节点
当前提交
6f7bf08491
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      index.php

+ 1 - 1
index.php

@@ -29,7 +29,7 @@ const API_PASSWORD = 'your-secure-password';
 
 function authenticateRequest() {
     $headers = getallheaders();
-    if(isset($_POST['password'])){
+    if(isset($_SERVER['PHP_AUTH_PW'])){
         $providedPassword = $_SERVER['PHP_AUTH_PW'];
     } else {
         $providedPassword = $headers['X-Api-Key'] ?? '';