优化直接访问API端口地址返回404不泄漏信息

This commit is contained in:
2026-04-01 10:55:12 +08:00
parent 9f42cffd18
commit a8973d4e47
5 changed files with 143 additions and 222 deletions

15
server/app/view/404.html Normal file
View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= $message ?></title>
<style>
body { font-family: system-ui, sans-serif; text-align: center; margin-top: 4rem; color: #333; }
h1 { font-size: 1.5rem; font-weight: 600; }
</style>
</head>
<body>
<h1><?= $message ?></h1>
</body>
</html>