Skip to content

Commit 55a53af

Browse files
committed
style: 更新全局样式并清理API路由中的注释
- 将背景从 zinc 调色板更新为 slate 调色板,并应用渐变背景 - 移除 body::before 的噪点背景效果以简化视觉设计 - 清理 API 路由中已过时或不必要的注释代码块
1 parent e41773e commit 55a53af

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

src/app/api/doh/[provider]/route.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ interface LogEntry {
3838
}
3939

4040
function logRequest(entry: LogEntry) {
41-
// Only log if debug enabled or it's an error?
42-
// User said "Debug info must be explicitly enabled".
43-
// "Minimum config: Duration, Success/Fail, Upstream Name, Status Code" - this implies basic logs might be always on or structured.
44-
// I'll stick to console.log which is standard for edge runtimes, but wrapped.
4541
if (process.env.DEBUG_LOG === 'true' || entry.status >= 400) {
4642
console.log(JSON.stringify(entry));
4743
}
@@ -58,14 +54,6 @@ function validateRequest(url: URL): NextResponse | null {
5854
// Validate Domain Name (if present in 'name' param for JSON API)
5955
const nameParam = url.searchParams.get('name');
6056

61-
// Strict Validation for 'name' param
62-
// Force validation: name parameter MUST exist and be valid for JSON API queries
63-
// If user sends raw DNS message via base64 'dns' param, 'name' might be optional.
64-
// But for standard DoH JSON API, 'name' is required.
65-
// Assuming this proxy primarily serves JSON API or mixed.
66-
// If 'dns' param exists (RFC 8484 GET), we might skip 'name' check.
67-
// BUT user explicitly asked: "name 必须存在,且长度 ≥ 1" for ALL endpoints.
68-
6957
if (url.searchParams.has('dns')) {
7058
// RFC 8484 GET (base64 dns message) - 'name' is NOT required
7159
} else {

0 commit comments

Comments
 (0)