aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/http/www/Settings.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/http/www/Settings.java')
-rw-r--r--src/main/java/com/juick/http/www/Settings.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/juick/http/www/Settings.java b/src/main/java/com/juick/http/www/Settings.java
index 3713157f..6c39138f 100644
--- a/src/main/java/com/juick/http/www/Settings.java
+++ b/src/main/java/com/juick/http/www/Settings.java
@@ -17,6 +17,7 @@
*/
package com.juick.http.www;
+import com.juick.server.Endpoints;
import org.springframework.jdbc.core.JdbcTemplate;
import javax.servlet.ServletException;
@@ -71,7 +72,7 @@ public class Settings {
if (uid > 0) {
String hash = com.juick.server.UserQueries.getHashByUID(sql, uid);
Cookie c = new Cookie("hash", hash);
- c.setDomain(".juick.com");
+ c.setDomain("." + Endpoints.getWwwJuickComDomain());
c.setMaxAge(365 * 24 * 60 * 60);
response.addCookie(c);
@@ -81,7 +82,7 @@ public class Settings {
}
String referer = request.getHeader("Referer");
- if (referer != null && referer.startsWith("http://juick.com/") && !referer.equals("http://juick.com/login")) {
+ if (referer != null && referer.startsWith("http://"+Endpoints.wwwJuickCom+"/") && !referer.equals("http://"+Endpoints.wwwJuickCom+"/login")) {
response.sendRedirect(referer);
} else {
response.sendRedirect("/");