Browse Source

Fix parsing of header SYZOJ-No-CDN

master
Menci 6 years ago
parent
commit
19e5431b3c
  1. 2
      app.js

2
app.js

@ -170,7 +170,7 @@ global.syzoj = {
app.use(Session(sessionConfig)); app.use(Session(sessionConfig));
app.use((req, res, next) => { app.use((req, res, next) => {
res.locals.useLocalLibs = !!req.headers['syzoj-no-cdn']; res.locals.useLocalLibs = !!parseInt(req.headers['syzoj-no-cdn']);
let User = syzoj.model('user'); let User = syzoj.model('user');
if (req.session.user_id) { if (req.session.user_id) {

Loading…
Cancel
Save