Is there any way to disable a admin page in starpi?

做~自己de王妃 提交于 2021-01-29 05:38:25

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!