兼容开放导入未签名请求

This commit is contained in:
yml2213
2026-06-11 07:32:11 +08:00
parent 88b1df64e7
commit 7130135e23
5 changed files with 37 additions and 17 deletions
-3
View File
@@ -120,9 +120,6 @@ func (c Config) ValidateProductionSecurity() error {
if isPlaceholder(c.PaymentConfigEncryptionKey) || (keyLen != 16 && keyLen != 24 && keyLen != 32) {
return errors.New("PAYMENT_CONFIG_ENCRYPTION_KEY must be 16, 24, or 32 bytes in production")
}
if strings.TrimSpace(c.ExternalUploadSecret) == "" || isPlaceholder(c.ExternalUploadSecret) {
return errors.New("EXTERNAL_UPLOAD_SECRET is required in production")
}
if c.BootstrapAdminPassword != "" && isPlaceholder(c.BootstrapAdminPassword) {
return errors.New("ADMIN_BOOTSTRAP_PASSWORD must not use the example placeholder in production")
}