Browse Source

api: Fixed issues migrating to new gqlgen-based graphql server

1.0
Gisle Aune 6 years ago
parent
commit
ff4f4549e4
  1. 12
      middleware/session.js
  2. 2
      routes/auth.js
  3. 2
      rpdata/api/LogHeader.js

12
middleware/session.js

@ -2,14 +2,12 @@ const session = require("express-session")
const config = require("../config")
var RedisStore = require('connect-redis')(session);
var sess = {
module.exports = session({
secret: config.session.secret,
store: new RedisStore(config.redis),
cookie: {},
cookie: {
secure: config.session.secure
},
resave: false,
saveUninitialized: true,
}
sess.cookie.secure = config.session.secure
module.exports = session(sess)
})

2
routes/auth.js

@ -4,8 +4,10 @@ const passport = require("../middleware/passport")
const router = express.Router()
function saveReferer(req, res, next) {
if (req.session != null) {
req.session.loginReferrer = req.get("Referer")
req.session.save()
}
next()
}

2
rpdata/api/LogHeader.js

@ -65,7 +65,7 @@ const logHeaderApi = {
channelName
title
description
event
eventName
open
characters {
id

Loading…
Cancel
Save