HF RL Explorer

Task: Force SSL/HTTPS Redirect in Express.js

Task: Force SSL/HTTPS Redirect in Express.js: a task in Terminal-Lego-15k (Harbor dataset). Create an Express.js middleware that redirects all non-secure HTTP traffic (port 80) to the secured HTTPS port (443). The solution must handle the challenge of detecting whether a request came over HTTP or…

The task

Create an Express.js middleware that redirects all non-secure HTTP traffic (port 80) to the secured HTTPS port (443). The solution must handle the challenge of detecting whether a request came over HTTP or HTTPS within Express.js.

Part of PrimeIntellect/Terminal-Lego-15k.