[优化] 添加基本鉴权支持,更新相关逻辑以生成 htpasswd 文件

This commit is contained in:
ryan
2026-05-26 10:41:41 +08:00
parent be68b581e9
commit c9a532db65
7 changed files with 112 additions and 29 deletions
+1 -1
View File
@@ -963,7 +963,7 @@ func certFileMode(relativePath string) fs.FileMode {
switch strings.ToLower(filepath.Ext(strings.TrimSpace(relativePath))) {
case ".crt", ".pem":
return 0o644
case ".key":
case ".key", ".htpasswd":
return 0o600
default:
return 0o644