From 19e5431b3cda6552322f9bdbc2cea501ba8d679c Mon Sep 17 00:00:00 2001 From: Menci Date: Wed, 12 Dec 2018 21:50:01 +0800 Subject: [PATCH] Fix parsing of header SYZOJ-No-CDN --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index fb29486..2e04ea9 100644 --- a/app.js +++ b/app.js @@ -170,7 +170,7 @@ global.syzoj = { app.use(Session(sessionConfig)); 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'); if (req.session.user_id) {