Redirect http to https express.js

前端 未结 6 1978
-上瘾入骨i
-上瘾入骨i 2020-12-19 16:56

I\'m trying to reroute http (80) to https (443) in my express app. I\'m using some middle ware to do this. If i go to my https://my-example-

6条回答
  •  醉梦人生
    2020-12-19 17:21

    You just need to listen to both http and https in your express app. Then include the middleware to reroute if unsecure. Then add an iptable to reroute 443 => 8443. Done.

提交回复
热议问题