summaryrefslogtreecommitdiff
path: root/bucky
diff options
context:
space:
mode:
Diffstat (limited to 'bucky')
-rw-r--r--bucky/app/site.js20
-rw-r--r--bucky/util/auth.js1
-rw-r--r--bucky/util/upload.js4
3 files changed, 12 insertions, 13 deletions
diff --git a/bucky/app/site.js b/bucky/app/site.js
index c447991..9374281 100644
--- a/bucky/app/site.js
+++ b/bucky/app/site.js
@@ -47,22 +47,22 @@ site.init = function(){
if (!process.env.SESSIONS_IN_MEMORY) {
sessionSettings.store = new MongoStore({
url: 'mongodb://localhost/buckySessionDb'
-// type: 'mongodb',
-// host: 'localhost',
-// port: 27017,
-// dbName: 'buckySessionDb',
-// collectionName: 'sessions',
-// timeout: 10000,
+ // type: 'mongodb',
+ // host: 'localhost',
+ // port: 27017,
+ // dbName: 'buckySessionDb',
+ // collectionName: 'sessions',
+ // timeout: 10000,
})
}
app.use(session(sessionSettings))
upload.init()
// federate.route(app)
-// app.use(csurf({
-// cookie: true,
-// value: (req) => { req.headers['csrf-token'] }
-// }))
+ // app.use(csurf({
+ // cookie: true,
+ // value: (req) => { req.headers['csrf-token'] }
+ // }))
app.disable('x-powered-by')
auth.init()
diff --git a/bucky/util/auth.js b/bucky/util/auth.js
index 16368cf..d457704 100644
--- a/bucky/util/auth.js
+++ b/bucky/util/auth.js
@@ -1,4 +1,3 @@
-
var passport = require('passport')
var LocalStrategy = require('passport-local').Strategy
var crypto = require('crypto')
diff --git a/bucky/util/upload.js b/bucky/util/upload.js
index 8975458..e38fe30 100644
--- a/bucky/util/upload.js
+++ b/bucky/util/upload.js
@@ -1,6 +1,6 @@
var knox = require('knox')
-var uuid = require('node-uuid')
+var uuid = require('uuid/v1')
var s3
@@ -40,7 +40,7 @@ module.exports.put = function (opt) {
} else if (opt.preserveFilename) {
filename = file.originalname
} else {
- filename = uuid.v1() + "." + extension;
+ filename = uuid() + "." + extension;
}
var remote_path = opt.dirname + filename