Add configuration to disable autoOpen administration

This commit is contained in:
Aurelsicoko 2018-08-08 15:27:17 +02:00
parent cf3d0f65e2
commit 298be5edc3
2 changed files with 2 additions and 1 deletions

View File

@ -339,6 +339,7 @@ Most of the application's configurations are defined by environment. It means th
- [`cron`](https://en.wikipedia.org/wiki/Cron)
- `enabled` (boolean): Enable or disable CRON tasks to schedule jobs at specific dates. Default value: `false`.
- `admin`
- `autoOpen` (boolean): Enable or disabled administration opening on start (default: `true`)
- `path` (string): Allow to change the URL to access the admin (default: `/admin`).
- `build`
- `host` (string): URL to access the admin panel (default: `http://localhost:1337/admin`).

View File

@ -136,7 +136,7 @@ class Strapi extends EventEmitter {
cb();
}
if (this.config.environment === 'development') {
if (this.config.environment === 'development' && get(this.config.currentEnvironment, 'server.admin.autoOpen', true) !== false) {
utils.openBrowser.call(this);
}
});