From 6d1472bf8c75450d0d2318f19ce13539bd644cc0 Mon Sep 17 00:00:00 2001 From: ohemorange Date: Mon, 25 Nov 2019 18:53:20 -0800 Subject: [PATCH] Implement redirect by default (#7595) * Change redirect default to yes so that it happens automatically in noninteractive mode * Update changelog --- certbot/CHANGELOG.md | 3 +++ certbot/certbot/_internal/display/enhancements.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md index dfb6acde8..b5794c2dd 100644 --- a/certbot/CHANGELOG.md +++ b/certbot/CHANGELOG.md @@ -28,6 +28,9 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). `certbot.reverter.Reverter.view_config_changes`, and `certbot.util.get_systemd_os_info` have been removed * Certbot's `register --update-registration` subcommand has been removed +* When possible, default to automatically configuring the webserver so all requests + redirect to secure HTTPS access. This is mostly relevant when running Certbot + in non-interactive mode. Previously, the default was to not redirect all requests. ### Fixed 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: