зеркало из https://github.com/mozilla/make-valet.git
Remove profile bits
This commit is contained in:
Родитель
6eab45a5a9
Коммит
49715ea57a
3
env.dist
3
env.dist
|
@ -18,9 +18,6 @@ export MAKE_PRIVATE_KEY=00000000-0000-0000-000000000000
|
|||
# Location of the webmaker.org server
|
||||
export WEBMAKERORG=http://localhost:7777
|
||||
|
||||
# webmaker-profile-2 URL
|
||||
export PROFILE_URL="http://localhost:7777/user/{username}"
|
||||
|
||||
# Google Analytics settings
|
||||
export GA_ACCOUNT=
|
||||
export GA_DOMAIN=
|
||||
|
|
|
@ -35,8 +35,6 @@ module.exports.errorHandler = function(err, req, res, next) {
|
|||
status: http.STATUS_CODES[err.status] ? err.status : 500
|
||||
};
|
||||
|
||||
console.error(err.stack);
|
||||
|
||||
res.status(error.status);
|
||||
res.render("error.html", error);
|
||||
};
|
||||
|
|
|
@ -56,11 +56,3 @@ module.exports.proxyHandler = function(req, res, next) {
|
|||
next(err);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.webmakerProfile2Redirect = function(profileURL) {
|
||||
var redirectURL = template.parse(profileURL);
|
||||
|
||||
return function(req, res, next) {
|
||||
res.redirect(307, redirectURL.expand({ username: res.locals.username }));
|
||||
};
|
||||
};
|
||||
|
|
|
@ -131,12 +131,6 @@ app.get(
|
|||
routes.healthCheck
|
||||
);
|
||||
|
||||
app.get(
|
||||
"/",
|
||||
middleware.setUsername,
|
||||
routes.webmakerProfile2Redirect(env.get("PROFILE_URL"))
|
||||
);
|
||||
|
||||
app.get(
|
||||
"/dynamic/js/googleanalytics.js",
|
||||
routes.analytics
|
||||
|
|
Загрузка…
Ссылка в новой задаче