From 2e9215a257324fadb821518491242d3d77c24432 Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Fri, 29 Jun 2012 15:54:24 +0100
Subject: [PATCH] when serving non-minified resources, substitute urls in
 templates so once can locally test links embedded in templates (like persona
 tos/pp)

---
 bin/browserid | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/bin/browserid b/bin/browserid
index e1db01419..3e88bd93f 100755
--- a/bin/browserid
+++ b/bin/browserid
@@ -144,6 +144,12 @@ app.use(function(req, res, next) {
   next();
 });
 
+// if we're not serving minified resources (local dev), then we should add
+// .ejs to the mime table so it's properly substituted.  issue #1875
+if (!config.get('use_minified_resources')) {
+  express.static.mime.types['ejs'] = 'text/html';
+}
+
 app.use(express.static(static_root));
 
 // open the databse
-- 
GitLab