Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

707
Views
Error de Sailsjs Heroku Postgresql: certificado autofirmado

Soy nuevo en sails.js e implementé heroku y también agregué un complemento heroku postgreql. En mi archivo datastore.js, agregué la siguiente configuración para poder migrar mis modelos al nuevo complemento de base de datos. Aquí hay un fragmento de mi archivo datastore.js.

 adapter: "sails-postgresql", // URL: my-postgresql-url // ssl: true,

En mi archivo production.js, aquí hay un fragmento del almacén de datos.

 adapter: "sails-postgresql", url: process.env.DATABASE_URL, ssl: true,

No sé cuál parece ser el problema, pero el servidor sigue arrojando este error.

 { error: Error: self signed certificate at TLSSocket.onConnectSecure (_tls_wrap.js:1498:34) at TLSSocket.emit (events.js:314:20) at TLSSocket.EventEmitter.emit (domain.js:486:12) at TLSSocket._finishInit (_tls_wrap.js:933:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:707:12) { code: 'DEPTH_ZERO_SELF_SIGNED_CERT' }, meta: { adapter: 'sails-postgresql', url: 'my-postgresql-url', ssl: true, identity: 'default' } }

No sé qué hacer exactamente, cualquier ayuda será bienvenida. Gracias.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

De acuerdo, después de leer diferentes artículos y buscar en Google, para resolver el problema, solo tenía que hacer esto.

 ssl: { rejectUnauthorized: false }

y eso solucionó el problema.

over 4 years ago · Santiago Trujillo Report

0

Golpee este problema durante la noche. Algunas manipulaciones e identificaron que se necesitan propiedades adicionales en la configuración de SSL:

Un objeto de almacén de datos en funcionamiento para Heroku PostgreSQL es el siguiente:

 datastores: { default: { adapter: 'sails-postgresql', url: process.env.DATABASE_URL, ssl: { sslmode: 'require', rejectUnauthorized: false, } }, },
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!