From df850ee980960abb79b09fb6139334439891f2ea Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 19 Nov 2014 09:33:31 +0100 Subject: [PATCH] Reduce the matching of REWRITE_HTTPS_ARGS and add query string If the backreference of the match is not used, it's enough to match '^' instead of '^.*$'. It's slightly faster. ^ -> Match, if it starts ^.*$` -> Match, if everything matches In addition it might be useful to append the query string with the flag: QSA --- letsencrypt/client/CONFIG.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt/client/CONFIG.py b/letsencrypt/client/CONFIG.py index 8c7c4b6d4..910e5c881 100644 --- a/letsencrypt/client/CONFIG.py +++ b/letsencrypt/client/CONFIG.py @@ -56,4 +56,4 @@ CHALLENGE_PREFERENCES = ["dvsni", "recoveryToken"] EXCLUSIVE_CHALLENGES = [set(["dvsni", "simpleHttps"])] # Rewrite rule arguments used for redirections to https vhost -REWRITE_HTTPS_ARGS = ["^.*$", "https://%{SERVER_NAME}%{REQUEST_URI}", "[L,R=permanent]"] +REWRITE_HTTPS_ARGS = ["^", "https://%{SERVER_NAME}%{REQUEST_URI}", "[L,QSA,R=permanent]"]