@ -1,6 +1,7 @@
'use strict' ;
const path = require ( 'path' ) ;
const nconf = require ( 'nconf' ) ;
module . exports = function ( app , middleware , controllers ) {
app . get ( '/sitemap.xml' , controllers . sitemap . render ) ;
@ -11,7 +12,7 @@ module.exports = function (app, middleware, controllers) {
app . get ( '/manifest.webmanifest' , controllers . manifest ) ;
app . get ( '/css/previews/:theme' , controllers . admin . themes . get ) ;
app . get ( '/osd.xml' , controllers . osd . handle ) ;
app . get ( '/ service-worker.js', function ( req , res ) {
res . status ( 200 ) . type ( 'application/javascript' ) . se ndFile( path . join ( _ _dirname , '../../public/src/service-worker.js' ) ) ;
app . get ( '/ assets/src/ service-worker.js', function ( req , res ) {
res . status ( 200 ) . type ( 'application/javascript' ) . se t( 'Service-Worker-Allowed' , nconf . get ( 'relative_path' ) + '/' ) . se ndFile( path . join ( _ _dirname , '../../public/src/service-worker.js' ) ) ;
} ) ;
} ;