From 50a325d27a274aefc72fda4e57f57d154f3ca1ab Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 4 Jul 2023 15:12:10 +0200 Subject: [PATCH] Report http->https redirection as warning instead of info for app packaging v2 --- package_linter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package_linter.py b/package_linter.py index 4a994e2..546a1e0 100755 --- a/package_linter.py +++ b/package_linter.py @@ -1312,7 +1312,8 @@ class Configurations(TestSuite): content = open(app.path + "/conf/" + filename).read() if "if ($scheme = http)" in content and "rewrite ^ https" in content: - yield Info( + level = Info if app_packaging_format <= 1 else Warning + yield level( "Since Yunohost 4.3, the http->https redirect is handled by the core, " "therefore having an if ($scheme = http) { rewrite ^ https://... } block " "in the nginx config file is deprecated. (This helps with supporting Yunohost-behind-reverse-proxy use case)"