Report http->https redirection as warning instead of info for app packaging v2

This commit is contained in:
Alexandre Aubin 2023-07-04 15:12:10 +02:00
parent 809c45601d
commit 50a325d27a

View file

@ -1312,7 +1312,8 @@ class Configurations(TestSuite):
content = open(app.path + "/conf/" + filename).read() content = open(app.path + "/conf/" + filename).read()
if "if ($scheme = http)" in content and "rewrite ^ https" in content: 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, " "Since Yunohost 4.3, the http->https redirect is handled by the core, "
"therefore having an if ($scheme = http) { rewrite ^ https://... } block " "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)" "in the nginx config file is deprecated. (This helps with supporting Yunohost-behind-reverse-proxy use case)"