Force content type on doT generated html strings

This commit is contained in:
Matthew Little 2014-05-21 19:58:41 -06:00
parent 9a3670988c
commit c3555ec959
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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);

View File

@ -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