Track recently active and signin times (#663)

* Track recently active and signin times

* Trust proxy headers in production
This commit is contained in:
Tom Moor
2018-06-04 19:07:56 -07:00
committed by GitHub
parent 1977278426
commit 53a0f423c3
6 changed files with 62 additions and 0 deletions

View File

@@ -70,6 +70,10 @@ if (process.env.NODE_ENV === 'development') {
app.use(mount('/emails', emails));
} else if (process.env.NODE_ENV === 'production') {
// trust header fields set by our proxy. eg X-Forwarded-For
app.proxy = true;
// catch errors in one place, automatically set status and response headers
onerror(app);
if (process.env.BUGSNAG_KEY) {