From 6a94c5de94b8755fe21babd4f854a7106dd157c8 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Mon, 23 May 2011 19:58:54 +0100 Subject: [PATCH] Create random pad name on the client side, this makes it possible to use it with ep-lite with https --- node/server.js | 19 ------------------- static/index.html | 25 +++++++++++++++++++++---- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/node/server.js b/node/server.js index d073756ce..0c8df2455 100644 --- a/node/server.js +++ b/node/server.js @@ -81,13 +81,6 @@ async.waterfall([ res.sendfile(filePath, { maxAge: 1000*60*60 }); }); - //redirect the newpad requests - app.get('/newpad', function(req, res) - { - res.header("Server", serverName); - res.redirect('/p/' + randomPadName()); - }); - //let the server listen app.listen(settings.port); console.log("Server is listening at port " + settings.port); @@ -135,15 +128,3 @@ function errorlog(e) console.error(timeStr + JSON.stringify(e)); } } - -function randomPadName() -{ - var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; - var string_length = 10; - var randomstring = ''; - for (var i=0; i
- New Pad + New Pad
-
or create a Pad with the name
+
or create a Pad with the name