Change redirect default to yes so that it happens automatically in noninteractive mode and remove error message

This commit is contained in:
Erica Portnoy 2019-11-25 14:58:27 -08:00
parent e023f889ff
commit 72678ce2a1
2 changed files with 1 additions and 6 deletions

View file

@ -557,11 +557,6 @@ class Client(object):
if ask_redirect:
if config_name == "redirect" and config_value is None:
config_value = enhancements.ask(enhancement_name)
if not config_value:
logger.warning("Future versions of Certbot will automatically "
"configure the webserver so that all requests redirect to secure "
"HTTPS access. You can control this behavior and disable this "
"warning with the --redirect and --no-redirect flags.")
if config_value:
self.apply_enhancement(domains, enhancement_name, option)
enhanced = True

View file

@ -50,7 +50,7 @@ def redirect_by_default():
code, selection = util(interfaces.IDisplay).menu(
"Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.",
choices, default=0,
choices, default=1,
cli_flag="--redirect / --no-redirect", force_interactive=True)
if code != display_util.OK: