diff options
Diffstat (limited to 'lib/web')
-rw-r--r-- | lib/web/auth/oauth2/index.js | 3 | ||||
-rw-r--r-- | lib/web/note/util.js | 3 | ||||
-rw-r--r-- | lib/web/statusRouter.js | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/web/auth/oauth2/index.js b/lib/web/auth/oauth2/index.js index 1865ad54..6e3e8373 100644 --- a/lib/web/auth/oauth2/index.js +++ b/lib/web/auth/oauth2/index.js @@ -90,7 +90,8 @@ passport.use(new OAuth2CustomStrategy({ clientSecret: config.oauth2.clientSecret, callbackURL: config.serverURL + '/auth/oauth2/callback', userProfileURL: config.oauth2.userProfileURL, - scope: config.oauth2.scope + scope: config.oauth2.scope, + state: true }, passportGeneralCallback)) oauth2Auth.get('/auth/oauth2', function (req, res, next) { diff --git a/lib/web/note/util.js b/lib/web/note/util.js index f1af1300..9c6c1c8a 100644 --- a/lib/web/note/util.js +++ b/lib/web/note/util.js @@ -59,7 +59,8 @@ exports.newNote = function (req, res, body) { models.Note.create({ ownerId: owner, alias: req.alias ? req.alias : null, - content: body + content: body, + title: models.Note.parseNoteTitle(body) }).then(function (note) { return res.redirect(config.serverURL + '/' + (note.alias ? note.alias : models.Note.encodeNoteId(note.id))) }).catch(function (err) { diff --git a/lib/web/statusRouter.js b/lib/web/statusRouter.js index 025aafd4..febe2df3 100644 --- a/lib/web/statusRouter.js +++ b/lib/web/statusRouter.js @@ -97,7 +97,8 @@ statusRouter.get('/config', function (req, res) { version: config.fullversion, DROPBOX_APP_KEY: config.dropbox.appKey, allowedUploadMimeTypes: config.allowedUploadMimeTypes, - linkifyHeaderStyle: config.linkifyHeaderStyle + linkifyHeaderStyle: config.linkifyHeaderStyle, + cookiePolicy: config.cookiePolicy } res.set({ 'Cache-Control': 'private', // only cache by client |