Browse Source

feat: Add setup check warning if instance is in debug mode

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Julius Härtl 1 year ago
parent
commit
a6966c0b2d
1 changed files with 6 additions and 0 deletions
  1. 6 0
      core/js/setupchecks.js

+ 6 - 0
core/js/setupchecks.js

@@ -521,6 +521,12 @@
 							type: OC.SetupChecks.MESSAGE_TYPE_WARNING
 						})
 					}
+					if (window.oc_debug) {
+						messages.push({
+							msg: t('core', 'This instance is running in debug mode. Only enable this for local development and not in production environments.'),
+							type: OC.SetupChecks.MESSAGE_TYPE_WARNING
+						})
+					}
 
 					OC.SetupChecks.addGenericSetupCheck(data, 'OCA\\Settings\\SetupChecks\\PhpDefaultCharset', messages)
 					OC.SetupChecks.addGenericSetupCheck(data, 'OCA\\Settings\\SetupChecks\\PhpOutputBuffering', messages)