Skip to content

Commit

Permalink
Merge pull request #200 from maxlaverse/master
Browse files Browse the repository at this point in the history
Fixes NPE on POST _session when npm tries to authenticate
  • Loading branch information
rlidwka committed Feb 12, 2015
2 parents 79e2ff2 + e588084 commit 0aed9ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0aed9ee

Please sign in to comment.