aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-06-26 20:16:18 +0530
committerBobby <[email protected]>2022-06-26 20:16:18 +0530
commitfa5b05a4cbdeeca75b472ca152591e1428f5508e (patch)
tree56b452b2bd2924abf29fbb2220bf751e4e26aed2
parent961318064e702eee158c12b0e79847581930d825 (diff)
downloadthatcomputerscientist-fa5b05a4cbdeeca75b472ca152591e1428f5508e.tar.xz
thatcomputerscientist-fa5b05a4cbdeeca75b472ca152591e1428f5508e.zip
replace www. subdomain with empty string for profile redirect
-rw-r--r--routes/account.routes.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/account.routes.js b/routes/account.routes.js
index f833c63f..b07c7d40 100644
--- a/routes/account.routes.js
+++ b/routes/account.routes.js
@@ -33,7 +33,7 @@ router.get("/", (req, res) => {
avatar: md5(user.gravatarEmail || user.email || ""),
url:
user.public == 1
- ? `${req.protocol + "://" + user.username + '.' + req.get("host")}`
+ ? `${req.protocol + "://" + user.username + '.' + req.get("host")}`.replace('www.', '')
: "",
},
});