From 6e9bbdde25f3bf688d5f5968c71c986db7c90cb8 Mon Sep 17 00:00:00 2001 From: Matt Bendiksen Date: Wed, 15 Mar 2023 22:44:53 -0500 Subject: [PATCH] scheme arg to create the redirect should be 'https' Since this example is trying to redirect HTTP requests to the HTTPS server, the scheme should be 'https.' I haven't tried running the example by itself, but I'm surprised it works as it is. Perhaps it is because of https.config.SERVER_NAME, but I wouldn't expect that since it doesn't include the scheme (but does include the port). --- examples/http_redirect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/http_redirect.py b/examples/http_redirect.py index 50a79d81ad..0632279f52 100644 --- a/examples/http_redirect.py +++ b/examples/http_redirect.py @@ -29,7 +29,7 @@ def proxy(request, path): path=path, _server=https.config.SERVER_NAME, _external=True, - _scheme="http", + _scheme="https", ) return response.redirect(url)