From 8eaf45ee6a71969eff3e04b40e4435e0dd380824 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20D=C3=B6rre?= Date: Mon, 3 Oct 2016 14:02:01 +0200 Subject: [PATCH] upd: use same-protocol-prefixes for static-links Change-Id: I0e556b4dde914e0c8eeaccb9c6e5c703225a46ff --- src/org/cacert/gigi/Gigi.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/org/cacert/gigi/Gigi.java b/src/org/cacert/gigi/Gigi.java index 7f6b3c18..2f4c27dd 100644 --- a/src/org/cacert/gigi/Gigi.java +++ b/src/org/cacert/gigi/Gigi.java @@ -315,17 +315,7 @@ public final class Gigi extends HttpServlet { } - private static String staticTemplateVarHttp = "http://" + ServerConstants.getStaticHostNamePort(); - - private static String staticTemplateVarHttps = "https://" + ServerConstants.getStaticHostNamePortSecure(); - - private static String getStaticTemplateVar(boolean https) { - if (https) { - return staticTemplateVarHttps; - } else { - return staticTemplateVarHttp; - } - } + private static String staticTemplateVar = "//" + ServerConstants.getStaticHostNamePort(); @Override protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { @@ -429,7 +419,7 @@ public final class Gigi extends HttpServlet { vars.put(Menu.AUTH_VALUE, currentAuthContext); vars.put("menu", rootMenu); vars.put("title", lang.getTranslation(p.getTitle())); - vars.put("static", getStaticTemplateVar(isSecure)); + vars.put("static", staticTemplateVar); vars.put("year", Calendar.getInstance().get(Calendar.YEAR)); vars.put("content", content); if (currentAuthContext != null) { -- 2.39.2