From 88334959d708c2cef12b7fc5556d9a39823b8300 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 13 Dec 2017 14:13:45 +0000 Subject: [PATCH] added remove extension --- services/web/app/coffee/infrastructure/ExpressLocals.coffee | 3 +++ services/web/app/views/layout.pug | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/app/coffee/infrastructure/ExpressLocals.coffee b/services/web/app/coffee/infrastructure/ExpressLocals.coffee index 7aef6e5424..33dbe2f34a 100644 --- a/services/web/app/coffee/infrastructure/ExpressLocals.coffee +++ b/services/web/app/coffee/infrastructure/ExpressLocals.coffee @@ -157,6 +157,9 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)-> qs = querystring.stringify(opts.qs) + if opts.removeExtension == true + path = path.slice(0,-3) + if qs? and qs.length > 0 path = path + "?" + qs return path diff --git a/services/web/app/views/layout.pug b/services/web/app/views/layout.pug index d9bba35f0b..0220a5af71 100644 --- a/services/web/app/views/layout.pug +++ b/services/web/app/views/layout.pug @@ -143,7 +143,7 @@ html(itemscope, itemtype='http://schema.org/Product') "paths" : { "moment": "libs/#{lib('moment')}", "fineuploader": "libs/#{lib('fineuploader')}", - "main": "#{buildJsPath('main.js', {hashedPath:true, fingerprint:false}).slice(0,-3)}", + "main": "#{buildJsPath('main.js', {hashedPath:true, fingerprint:false, removeExtension:true})}" }, "config":{ "moment":{