mirror of
https://github.com/strapi/strapi.git
synced 2025-09-16 12:02:41 +00:00
commit
006d9f6f03
File diff suppressed because one or more lines are too long
@ -445,15 +445,15 @@
|
||||
"policy": ""
|
||||
},
|
||||
"callback": {
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"policy": ""
|
||||
},
|
||||
"register": {
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"policy": ""
|
||||
},
|
||||
"forgotPassword": {
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"policy": ""
|
||||
},
|
||||
"changePassword": {
|
||||
|
@ -81,6 +81,27 @@ module.exports = strapi => {
|
||||
]
|
||||
});
|
||||
|
||||
// Allow refresh in admin page.
|
||||
strapi.router.route({
|
||||
method: 'GET',
|
||||
path: `${basename}/*`,
|
||||
handler: [
|
||||
async (ctx, next) => {
|
||||
const parse = path.parse(ctx.url);
|
||||
|
||||
if (parse.ext === '') {
|
||||
ctx.url = 'index.html';
|
||||
}
|
||||
|
||||
await next();
|
||||
},
|
||||
strapi.koaMiddlewares.static(`./admin/admin/build`, {
|
||||
maxage: strapi.config.middleware.settings.public.maxAge,
|
||||
defer: true
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
// Serve admin assets.
|
||||
strapi.router.route({
|
||||
method: 'GET',
|
||||
|
Loading…
x
Reference in New Issue
Block a user