Tweak design, numerous fixes
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user