From c3555ec95963440f88ff765e980e8e0d52ac4d34 Mon Sep 17 00:00:00 2001 From: Matthew Little Date: Wed, 21 May 2014 19:58:41 -0600 Subject: [PATCH] Force content type on doT generated html strings --- README.md | 8 ++++++-- init.js | 2 +- libs/website.js | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 95146bc..85d400c 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,12 @@ Usage ##### Seriously Those are legitimate requirements. If you use old versions of Node.js or Redis that may come with your system package manager then you will have problems. Follow the linked instructions to get the last stable versions. + +[**Redis security warning**](http://redis.io/topics/security): be sure firewall access to redis - an easy way is to +include `bind 127.0.0.1` in your `redis.conf` file. Also it's a good idea to learn about and understand software that +you are using - a good place to start with redis is [data persistence](http://redis.io/topics/persistence). + + #### 0) Setting up coin daemon Follow the build/install instructions for your coin daemon. Your coin.conf file should end up looking something like this: ``` @@ -152,8 +158,6 @@ a good pool operator. For starters be sure to read: #### 1) Downloading & Installing -[**Redis security warning**](http://redis.io/topics/security): be sure firewall access to redis - an easy way is to include `bind 127.0.0.1` in your `redis.conf` file - Clone the repository and run `npm update` for all the dependencies to be installed: ```bash diff --git a/init.js b/init.js index 75bdc61..fc8a81b 100644 --- a/init.js +++ b/init.js @@ -223,7 +223,7 @@ var spawnPoolWorkers = function(){ worker.type = 'pool'; poolWorkers[forkId] = worker; worker.on('exit', function(code, signal){ - logger.error('Master', 'PoolSpanwer', 'Fork ' + forkId + ' died, spawning replacement worker...'); + logger.error('Master', 'PoolSpawner', 'Fork ' + forkId + ' died, spawning replacement worker...'); setTimeout(function(){ createPoolWorker(forkId); }, 2000); diff --git a/libs/website.js b/libs/website.js index 7922dac..b570c24 100644 --- a/libs/website.js +++ b/libs/website.js @@ -218,6 +218,7 @@ module.exports = function(logger){ var route = function(req, res, next){ var pageId = req.params.page || ''; if (pageId in indexesProcessed){ + res.header('Content-Type', 'text/html'); res.end(indexesProcessed[pageId]); } else