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

291
Views
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 answers
Answer question

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