From 9aa1943741d6835e893a8fc3b74c7fa1ab09a0a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 2 Feb 2013 16:57:52 +0100 Subject: [PATCH] Protect nodePush with htaccess --- file/acp/be.bastelstu.chat.nodePush/.htaccess | 1 + .../be.bastelstu.chat.nodePush/lib/server.coffee | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 file/acp/be.bastelstu.chat.nodePush/.htaccess diff --git a/file/acp/be.bastelstu.chat.nodePush/.htaccess b/file/acp/be.bastelstu.chat.nodePush/.htaccess new file mode 100644 index 0000000..3418e55 --- /dev/null +++ b/file/acp/be.bastelstu.chat.nodePush/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/file/acp/be.bastelstu.chat.nodePush/lib/server.coffee b/file/acp/be.bastelstu.chat.nodePush/lib/server.coffee index 5a3cb00..835a398 100644 --- a/file/acp/be.bastelstu.chat.nodePush/lib/server.coffee +++ b/file/acp/be.bastelstu.chat.nodePush/lib/server.coffee @@ -1,8 +1,8 @@ ### # node.js Pushserver for Tims Chat. # -# @author Tim Düsterhus -# @copyright 2010-2013 Tim Düsterhus +# @author Tim Düsterhus +# @copyright 2010-2013 Tim Düsterhus # @license Creative Commons Attribution-NonCommercial-ShareAlike # @package be.bastelstu.chat # @subpackage nodePush @@ -13,10 +13,10 @@ io = require 'socket.io' net = require 'net' fs = require 'fs' -config = require('../config.js') +config = require '../config.js' log = (message) -> - console.log '[be.bastelstu.chat.nodePush] '+message + console.log "[be.bastelstu.chat.nodePush] #{message}" class Server constructor: () -> @@ -24,8 +24,8 @@ class Server console.error 'Please run me via bin/run.sh' process.exit 1 log 'Starting Pushserver for Tims Chat' - log 'PID is ' + process.pid - log 'Using port: ' + config.port + log "PID is #{process.pid}" + log "Using port: #{config.port}" @initUnixSocket() @initSocketIO() @@ -45,7 +45,7 @@ class Server @socket.set 'log level', 1 @socket.set 'browser client etag', true @socket.set 'browser client minification', true - @socket.set 'browser client gzig', true + @socket.set 'browser client gzip', true @socket.configure 'development', (() -> @socket.set 'log level', 3