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

293
Vistas
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 Respuestas
Responde la pregunta

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 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