1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-21 07:29:37 +01:00

Merge pull request #200 from maxlaverse/master

Fixes NPE on POST _session when npm tries to authenticate
This commit is contained in:
Alex Kocharin 2015-02-12 14:26:15 +03:00
commit 0aed9ee9f4

@ -100,7 +100,7 @@ module.exports = function(config, auth, storage) {
// placeholder 'cause npm require to be authenticated to publish
// we do not do any real authentication yet
app.post('/_session', Cookies.express(), function(req, res) {
app.post('/_session', Cookies.express(), function(req, res, next) {
res.cookies.set('AuthSession', String(Math.random()), {
// npmjs.org sets 10h expire
expires: new Date(Date.now() + 10*60*60*1000)