X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Futil%2FServerConstants.java;h=21bbce98f63e9f439f04e96d5415a79e04e874c9;hp=8689209444b1f5199b0d6c29905aa2686d33d362;hb=6d1b746247f6e1eab7d1da17112beb9cf5abb089;hpb=98410d964cfab49b45c5e56c4f9577f6527f400b diff --git a/src/org/cacert/gigi/util/ServerConstants.java b/src/org/cacert/gigi/util/ServerConstants.java index 86892094..21bbce98 100644 --- a/src/org/cacert/gigi/util/ServerConstants.java +++ b/src/org/cacert/gigi/util/ServerConstants.java @@ -14,6 +14,8 @@ public class ServerConstants { private static String securePort, port; + private static String suffix = "cacert.local"; + public static void init(Properties conf) { securePort = port = ""; if ( !conf.getProperty("https.port").equals("443")) { @@ -26,6 +28,7 @@ public class ServerConstants { secureHostName = conf.getProperty("name.secure"); staticHostName = conf.getProperty("name.static"); apiHostName = conf.getProperty("name.api"); + suffix = conf.getProperty("name.suffix", conf.getProperty("name.www").substring(4)); } @@ -83,4 +86,16 @@ public class ServerConstants { return Integer.parseInt(port.substring(1, port.length())); } + public static String getSuffix() { + return suffix; + } + + public static String getSupportMailAddress() { + return "support@" + ServerConstants.getWwwHostName().replaceFirst("^www\\.", ""); + } + + public static String getBoardMailAddress() { + return "board@" + ServerConstants.getWwwHostName().replaceFirst("^www\\.", ""); + } + }