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

292
Visualizações
How to best implement HTTPS with Node.js for all connections?

I'm building a stateless authentication by Double Submit Cookie in Node.js/ExpressJs and wonder how I best can make all my connections go over HTTPS.

The reason is that I want to be able to handle high traffic and only use HTTPS for security reasons with the stateless authentication.

  1. Should I avoid the HTTPS npm dependency and set up a reverse proxy server in Nginx?

  2. Perhaps I can configure Nginx so that it will enforce HTTPS without doing any other in-app settings in ExpressJs?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You have two options:

  1. Use the built-in https module that comes with Node.js (not an npm module). This will handle the HTTPS requests. Good for light applications, personal web sites, development.
  2. Set up a proxy (nginx, HAProxy, etc.) in front of your Web server (which uses http module). The proxy will terminate SSL from an incoming HTTPS request, then proxy a plain HTTP request to your Web server. Good for production, high traffic applications that also need load balancing provided by these proxy software.

For playing around, I suggest going simple with the built-in https module. I suppose you do not expect millions of requests to introduce a proxy to your stack.

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