Redirect to https in Node.js
amasad (2280)

If you want to make sure your replit site only serves https you can use this middleware.

You are viewing a single comment. View All
JadenGarcia (34)

What if I just did this?

if(/^http:\/\//.test(location.href))
location.href = location.href.replace(/^http:\/\//, "https://");

btw, check out https://FOS.StudentFires.repl.co