mirror of
https://github.com/strapi/strapi.git
synced 2025-09-16 20:10:05 +00:00
commit
006d9f6f03
File diff suppressed because one or more lines are too long
@ -445,15 +445,15 @@
|
|||||||
"policy": ""
|
"policy": ""
|
||||||
},
|
},
|
||||||
"callback": {
|
"callback": {
|
||||||
"enabled": true,
|
"enabled": false,
|
||||||
"policy": ""
|
"policy": ""
|
||||||
},
|
},
|
||||||
"register": {
|
"register": {
|
||||||
"enabled": true,
|
"enabled": false,
|
||||||
"policy": ""
|
"policy": ""
|
||||||
},
|
},
|
||||||
"forgotPassword": {
|
"forgotPassword": {
|
||||||
"enabled": true,
|
"enabled": false,
|
||||||
"policy": ""
|
"policy": ""
|
||||||
},
|
},
|
||||||
"changePassword": {
|
"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.
|
// Serve admin assets.
|
||||||
strapi.router.route({
|
strapi.router.route({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user