From feb820775c4fb146df536608dacd7178b39e9c19 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 19 May 2023 11:38:31 +0200 Subject: [PATCH] [FIX] runbot: download over https Firefox blocks downloads from http link if you are on an https page Allow to deactivate via an ICP in case the runbot is configured over HTTP (you shouldn't really) --- runbot/models/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runbot/models/build.py b/runbot/models/build.py index 43a7713e..468ea9e1 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -827,7 +827,8 @@ class BuildResult(models.Model): return os.path.join(root, 'build', build.dest, *l) def http_log_url(self): - return 'http://%s/runbot/static/build/%s/logs/' % (self.host, self.dest) + use_ssl = self.env['ir.config_parameter'].get_param('runbot.use_ssl', default=True) + return '%s://%s/runbot/static/build/%s/logs/' % ('https' if use_ssl else 'http', self.host, self.dest) def _server(self, *path): """Return the absolute path to the direcory containing the server file, adding optional *path"""