Tweak design, numerous fixes

This commit is contained in:
Cryptkeeper
2015-11-09 01:03:03 -06:00
parent e310891e8d
commit 56233745e0
7 changed files with 114 additions and 19 deletions

View File

@ -25,7 +25,15 @@ exports.start = function(callback) {
logger.log('info', '%s requested: %s', req.connection.remoteAddress, requestUrl);
if (requestUrl in urlMapping) {
if (requestUrl === '/status.json') {
res.setHeader('Content-Type', 'text/plain');
res.write(JSON.stringify({
error: true,
message: 'API deprecated.'
}));
res.end();
} else if (requestUrl in urlMapping) {
var file = urlMapping[requestUrl];
res.setHeader('Content-Type', mime.lookup(file));