Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

207
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda