bfenetworks / bfe

A modern layer 7 load balancer from baidu
https://www.bfe-networks.net
Apache License 2.0
6.14k stars 948 forks source link

Add support to disable https #977

Open mileszhang2016 opened 2 years ago

mileszhang2016 commented 2 years ago

Discussed in https://github.com/bfenetworks/bfe/discussions/927

Originally posted by **curiosport** January 2, 2022 I know that using `http `instead of `https` is absurd I just want to know if it is possible to omit the `TLS` certificate during development.
kwanhur commented 2 years ago

Solution proposal:

  1. add item HttpsEnabled in conf/bfe.conf and the same in ConfigBasic struct bfe_config/conf_basic.go, default true
  2. when HttpsEnabled is false, no check in (cfg *ConfigHttpsBasic) Check(confRoot string)
  3. HttpsEnabled is false, no initial in (srv *BfeServer) InitHttps()
  4. HttpsEnabled is false, no startup for https connection serving

others to check, like bfe_modules, built-in monitor points etc.