简体   繁体   中英

Express + CloudFlare with SSL

I have an express app freshly created using express appName . I've changed the port to 443. The domain is under CloudFlare's proxy with SSL enabled. When I go to the website though, I get the CloudFlare page Web server is down instead of seeing the express index page.

How can I make Express work with CloudFlare's SSL?

There are two options:

  • You need to alter your app such that it is able to accept HTTPS connections instead of HTTP. You can do this by using the HTTPS library instead of HTTP.
  • You can switch to Flexible SSL instead of Full, but this is not recommended for a lot of applications as it means the connection from Cloudflare's Edge to your Origin is unencrypted.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM