This commit is contained in:
Mikołaj Pich 2017-12-04 20:58:22 +01:00
parent d6c138ba95
commit 1cfffb0b81
2 changed files with 7 additions and 1 deletions

6
app.js
View file

@ -33,6 +33,12 @@ app.use(sassMiddleware({
}));
app.use(express.static(path.join(__dirname, 'public')));
app.use(function (req, res, next) {
res.locals.mainHost = "http://" + req.get('host')
.replace(/(cufs|uonetplus|uonetplus-opiekun|uonetplus-uzytkownik)\./, "");
next();
});
app.use(subdomain('cufs', cufs));
app.use(subdomain('uonetplus', uonetplus));
app.use(subdomain('uonetplus-opiekun', uonetplusOpiekun));

View file

@ -12,4 +12,4 @@ html
li
a(href="https://github.com/wulkanowy/fake-log") Github
li
a(href="http://fakelog.localhost:3000/") fake-log homepage
a(href=mainHost) fake-log homepage