From 84fc9970bcce873e1019a2fb24ae28e36c9b77a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Roch?= Date: Tue, 27 Jun 2017 10:00:15 +0200 Subject: [PATCH 1/2] Added Cache-Control in CORs allowed headers Some library set this header to avoid caching, but the browser will deny the COR request with `Request header field Cache-Control is not allowed by Access-Control-Allow-Headers in preflight response.` --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index a340294..3735c52 100644 --- a/server.js +++ b/server.js @@ -54,7 +54,7 @@ function authenticate(code, cb) { app.all('*', function (req, res, next) { res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Methods', 'GET, OPTIONS'); - res.header('Access-Control-Allow-Headers', 'Content-Type'); + res.header('Access-Control-Allow-Headers', 'Content-Type, Cache-Control'); next(); }); From 72ee7dc72a8aed8f79cda152265290a672307937 Mon Sep 17 00:00:00 2001 From: Sebastien Roch Date: Sat, 15 Jul 2017 14:43:45 +0200 Subject: [PATCH 2/2] upgrade Node.js version