fix: Self-Signed SSL Zertifikat in SDK State Store akzeptieren
Some checks failed
Build + Deploy / build-admin-compliance (push) Successful in 2m12s
Build + Deploy / build-backend-compliance (push) Successful in 3m18s
Build + Deploy / build-ai-sdk (push) Successful in 53s
Build + Deploy / build-developer-portal (push) Successful in 1m26s
Build + Deploy / build-tts (push) Successful in 1m35s
Build + Deploy / build-document-crawler (push) Successful in 40s
Build + Deploy / build-dsms-gateway (push) Successful in 25s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 21s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 3m9s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Successful in 50s
CI / test-python-backend (push) Successful in 41s
CI / test-python-document-crawler (push) Successful in 27s
CI / test-python-dsms-gateway (push) Successful in 28s
CI / validate-canonical-controls (push) Successful in 22s
Build + Deploy / trigger-orca (push) Successful in 2m55s
Some checks failed
Build + Deploy / build-admin-compliance (push) Successful in 2m12s
Build + Deploy / build-backend-compliance (push) Successful in 3m18s
Build + Deploy / build-ai-sdk (push) Successful in 53s
Build + Deploy / build-developer-portal (push) Successful in 1m26s
Build + Deploy / build-tts (push) Successful in 1m35s
Build + Deploy / build-document-crawler (push) Successful in 40s
Build + Deploy / build-dsms-gateway (push) Successful in 25s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 21s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 3m9s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Successful in 50s
CI / test-python-backend (push) Successful in 41s
CI / test-python-document-crawler (push) Successful in 27s
CI / test-python-dsms-gateway (push) Successful in 28s
CI / validate-canonical-controls (push) Successful in 22s
Build + Deploy / trigger-orca (push) Successful in 2m55s
Die Hetzner PostgreSQL nutzt ein Self-Signed Zertifikat. Der Node.js pg Pool lehnte es ab (DEPTH_ZERO_SELF_SIGNED_CERT), wodurch der SDK State nicht laden konnte → Application Error in ALLEN Modulen. Fix: rejectUnauthorized: false wenn sslmode=require in der URL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -92,11 +92,17 @@ class PostgreSQLStateStore implements StateStore {
|
|||||||
private pool: Pool
|
private pool: Pool
|
||||||
|
|
||||||
constructor(connectionString: string) {
|
constructor(connectionString: string) {
|
||||||
|
// Strip sslmode from URL — pg driver overrides our ssl config if it's in the URL.
|
||||||
|
// We handle SSL ourselves via the ssl option below.
|
||||||
|
const cleanUrl = connectionString.replace(/[?&]sslmode=[^&]*/g, '').replace(/\?$/, '')
|
||||||
|
const needsSsl = connectionString.includes('sslmode=require') || connectionString.includes('sslmode=verify')
|
||||||
this.pool = new Pool({
|
this.pool = new Pool({
|
||||||
connectionString,
|
connectionString: cleanUrl,
|
||||||
max: 5,
|
max: 5,
|
||||||
// Set search_path for compliance schema
|
// Set search_path for compliance schema
|
||||||
options: '-c search_path=compliance,core,public',
|
options: '-c search_path=compliance,core,public',
|
||||||
|
// Accept self-signed certificates (Hetzner PostgreSQL)
|
||||||
|
ssl: needsSsl ? { rejectUnauthorized: false } : false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user