Preparing for system design interviews?  Try bugzed.com →

HTTP to HTTPS Redirect Middleware

JSON →
library 1.3.1 ·javascript maintenance
verified Jun 17, 2026

redirect-https is a Node.js middleware designed for securing web applications by forcing HTTP traffic to HTTPS. It primarily functions by issuing a 301 (Moved Permanently) redirect for browsers while opting for an HTML meta refresh redirect for non-browser clients like APIs, bots, and `curl` requests. This deliberate choice aims to make developers aware of insecure HTTP usage, preventing silent failures often associated with direct 301s for programmatic access. The package is currently at version 1.3.1 and is a mature, stable utility with an infrequent release cadence, focusing on its core secure-by-default philosophy rather than extensive configurability. It is compatible with Express.js and standard Node.js `http` servers, offering options for custom body messages, proxy trust configuration, and specific path matching for advanced scenarios. Its key differentiator is the "secure-by-default" meta redirect strategy to surface security issues to developers.

total hits 27
actors 6 distinct systems
last hit 18d ago Bingbot
ByteDance
7
GPTBot
4
Amazonbot
4
Script
1
Search engines
1
Humans
6

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · VN · 🇬🇧 United Kingdom