File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,9 @@ class Web {
9595 sessionKeys : process . env . SESSION_KEYS
9696 ? process . env . SESSION_KEYS . split ( ',' )
9797 : [ 'lad' ] ,
98+ prettyPrintedJSON : process . env . PRETTY_PRINTED_JSON
99+ ? Boolean ( process . env . PRETTY_PRINTED_JSON )
100+ : false ,
98101 cookiesKey : process . env . COOKIES_KEY || 'lad.sid' ,
99102 favicon : {
100103 path : path . resolve ( './assets/img/favicon.ico' ) ,
@@ -376,7 +379,8 @@ class Web {
376379 app . use ( bodyParser ( ) ) ;
377380
378381 // pretty-printed json responses
379- app . use ( json ( ) ) ;
382+ // (default unless in development/test environment)
383+ app . use ( json ( { pretty : this . config . prettyPrintedJSON , param : 'pretty' } ) ) ;
380384
381385 // method override
382386 // (e.g. `<input type="hidden" name="_method" value="PUT" />`)
You can’t perform that action at this time.
0 commit comments