Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

206
Vistas
Disable SSL Trusted Peer requirement in specific express router

I'm a newbie to NodeJS(Any JS). I'm trying to develop an app which has multiple routers. Here are my router paths.

var app = express();
var apiRouter = express.Router();
var adminRouter = express.Router();
var pageRouter = express.Router();

app.use('/api', apiRouter);
app.use('/admin', adminRouter);
app.use('/', pageRouter);

apiRouter serve the rest api which will consume in mobile apps. adminRouter serves the admin dash board. pageRouter serves the end users as a landing page and some highlights of the app.

I have implemented SSL Peer implementation as below.

options = {
  key: // Path to key file, 
  ca: // Path to CA crt file, 
  cert: // Path to crt file, 
  requestCert: true, 
  rejectUnauthorized: true
};

How ever I need to remove SSL trusted peer implementation from pageRouter as end user do not have my certification and key. So how can I disable the SSL trusted peer implementation on pageRouter only?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You won't know what path a client is making a request for until its TLS session has already been negotiated. By that point, it's too late to reject a connection for lacking a client certificate.

Consider putting the API endpoints which require a client certificate on a separate subdomain, or a different port.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda