File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33const { pluginConfigSchema } = require ( './schema' ) ;
44
5- const config = {
6- default : ( { env } ) => ( {
7- cacheDir : env ( 'STRAPI_PLUGIN_LOCAL_IMAGE_SHARP_CACHE_DIR' , '' ) ,
8- maxAge : 3600 ,
9- paths : [ '/uploads' ]
10- } ) ,
11- validator ( config ) {
12- pluginConfigSchema . validateSync ( config ) ;
13- } ,
14- } ;
15-
165module . exports = {
17- config
6+ config : {
7+ default : ( { env } ) => ( {
8+ cacheDir : env ( 'STRAPI_PLUGIN_LOCAL_IMAGE_SHARP_CACHE_DIR' , '' ) ,
9+ maxAge : 3600 ,
10+ paths : [ '/uploads' ]
11+ } ) ,
12+ validator ( config ) {
13+ pluginConfigSchema . validateSync ( config ) ;
14+ } ,
15+ }
1816} ;
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ function createMiddleware(ipx) {
2323 const statusCode = 500 ;
2424 const statusMessage = 'No path found' ;
2525 strapi . log . debug ( statusMessage ) ;
26- return ctx . status = statusCode ;
26+ ctx . status = statusCode
27+ return ;
2728 }
2829
2930 const [ url , query ] = path . split ( '?' ) ;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ function register({ strapi }) {
4242 dir : config . srcDir + path ,
4343 } )
4444
45- router . get ( path + ' /(.*)' , createMiddleware ( ipx ) )
45+ router . get ( ` ${ path } /(.*)` , createMiddleware ( ipx ) )
4646 } )
4747
4848 strapi . server . use ( router . routes ( ) )
You can’t perform that action at this time.
0 commit comments