mirror of https://github.com/status-im/codimd.git
Merge pull request #1415 from hackmdio/bugfix/enable-version-check-only-in-production
Enable version check only in NODE_ENV production
This commit is contained in:
commit
05dd6eb739
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