mirror of
https://github.com/strapi/strapi.git
synced 2025-12-05 03:21:22 +00:00
Merge admin config into strapic config
This commit is contained in:
parent
d44a6f68ee
commit
a0011840e8
@ -2,6 +2,7 @@ module.exports = ({ env }) => ({
|
||||
host: env('HOST', '0.0.0.0'),
|
||||
port: env.int('PORT', 1337),
|
||||
admin: {
|
||||
autoOpen: true,
|
||||
auth: {
|
||||
secret: env('ADMIN_JWT_SECRET', 'example-token'),
|
||||
},
|
||||
|
||||
@ -327,6 +327,11 @@ class Strapi {
|
||||
const modules = await loadModules(this);
|
||||
|
||||
this.admin = require('@strapi/admin/strapi-server');
|
||||
|
||||
// TODO: rename into just admin and ./config/admin.js
|
||||
const userAdminConfig = strapi.config.get('server.admin');
|
||||
this.config.set('server.admin', _.merge(this.admin.config, userAdminConfig));
|
||||
|
||||
this.api = modules.api;
|
||||
this.components = modules.components;
|
||||
this.plugins = modules.plugins;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user