mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
allow for load testing connections to hit by a setting
This commit is contained in:
parent
e39b442840
commit
ec6a2b5ba9
3 changed files with 14 additions and 2 deletions
|
@ -23,8 +23,12 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
|
||||
io.use(function(socket, accept) {
|
||||
var data = socket.request;
|
||||
if (!data.headers.cookie) return accept('No session cookie transmitted.', false);
|
||||
|
||||
// Use a setting if we want to allow load Testing
|
||||
if(!data.headers.cookie && settings.loadTest){
|
||||
accept(null, true);
|
||||
}else{
|
||||
if (!data.headers.cookie) return accept('No session cookie transmitted.', false);
|
||||
}
|
||||
// Use connect's cookie parser, because it knows how to parse signed cookies
|
||||
connect.cookieParser(webaccess.secret)(data, {}, function(err){
|
||||
if(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue