From 72678ce2a1dfc00ca9fd15f93df24399db314401 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Mon, 25 Nov 2019 14:58:27 -0800 Subject: [PATCH] Change redirect default to yes so that it happens automatically in noninteractive mode and remove error message --- certbot/certbot/_internal/client.py | 5 ----- certbot/certbot/_internal/display/enhancements.py | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/certbot/certbot/_internal/client.py b/certbot/certbot/_internal/client.py index 2a9a52e73..20ca04633 100644 --- a/certbot/certbot/_internal/client.py +++ b/certbot/certbot/_internal/client.py @@ -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 diff --git a/certbot/certbot/_internal/display/enhancements.py b/certbot/certbot/_internal/display/enhancements.py index 5498b9547..0529f53c6 100644 --- a/certbot/certbot/_internal/display/enhancements.py +++ b/certbot/certbot/_internal/display/enhancements.py @@ -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: