问题
I am using strapi framework in one of my project. After development, I need to disable the admin dashboard ('/admin' route). I found the ways to change the URL, but not to disable. How can i do this?
回答1:
There is no option to disable the admin in production.
You can rename the admin
folder with _admin
(or delete the folder)
Update the plugin/users-permissions/middlewares/users-permissions/index.js
file and comment these lines:
// _.forEach(strapi.admin.config.routes, value => {
// if (_.get(value.config, 'policies')) {
// value.config.policies.unshift('plugins.users-permissions.permissions');
// }
// });
Then you will not be able to access to the admin pannel
来源:https://stackoverflow.com/questions/52643597/is-there-any-way-to-disable-a-admin-page-in-starpi