mirror of https://github.com/status-im/codimd.git
Enable version check only in NODE_ENV production
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
parent
f09b317e63
commit
59f177d891
3
app.js
3
app.js
|
@ -24,6 +24,7 @@ var logger = require('./lib/logger')
|
|||
var response = require('./lib/response')
|
||||
var models = require('./lib/models')
|
||||
var csp = require('./lib/csp')
|
||||
const { Environment } = require('./lib/config/enum')
|
||||
|
||||
const { versionCheckMiddleware, checkVersion } = require('./lib/web/middleware/checkVersion')
|
||||
|
||||
|
@ -169,7 +170,7 @@ app.use(require('./lib/middleware/checkURIValid'))
|
|||
app.use(require('./lib/middleware/redirectWithoutTrailingSlashes'))
|
||||
app.use(require('./lib/middleware/codiMDVersion'))
|
||||
|
||||
if (config.autoVersionCheck) {
|
||||
if (config.autoVersionCheck && process.env.NODE_ENV === Environment.production) {
|
||||
checkVersion(app)
|
||||
app.use(versionCheckMiddleware)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue