fix: disable TLS encryption by default to avoid ServerName IP address warning

- Set encrypt: false as default for SQL Server connections
- Fixes DEP0123 deprecation warning when connecting via IP address (VPN tunnel)
- trustServerCertificate option still configurable via environment variable
- Affects 6 files: sql-server.ts, bip-users-dao.ts, database/index.ts,
  database/data-source.ts, cleaner-handler.ts, validation-handler.ts
This commit is contained in:
Misaka_Company
2026-03-04 16:53:58 +08:00
parent a06276127d
commit 2f5dc7607d
6 changed files with 7 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ export class SqlServerService implements IDatabaseService {
password: this.config.password,
database: this.config.database,
options: {
encrypt: this.config.options?.encrypt ?? true,
encrypt: this.config.options?.encrypt ?? false,
trustServerCertificate: this.config.options?.trustServerCertificate ?? false
}
}