From e6aa4b76d0d55c7ee457f5dbc2806cf37d6e9e2f Mon Sep 17 00:00:00 2001 From: Patrick McDonagh Date: Thu, 8 Mar 2018 16:22:17 -0600 Subject: [PATCH] Fix CORS --- server/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/index.js b/server/index.js index b59f717..ea938b7 100644 --- a/server/index.js +++ b/server/index.js @@ -10,14 +10,14 @@ var MongoStore = require('connect-mongo')(session); app.use(express.static(__dirname + "/public")); app.use(morgan('dev')); -let whitelist = [ - 'localhost:3000', - 'http://localhost:3000', +let whitelist = ['localhost:3000', 'localhost:8080', 'http://localhost:8080', - 'reports.henrypump.cloud', - 'http://reports.henrypump.cloud' -]; + 'http://api.henrypump.cloud', + 'http://api.henrypump.cloud:3000', + 'api.henrypump.cloud', + 'http://reports.henrypump.cloud', + 'reports.henrypump.cloud']; // let whitelist = ['api.henrypump.cloud', 'http://api.henrypump.cloud', 'http://api.henrypump.cloud:3000', ]; var corsOptions = {