From 788466b640af73bebfd034c3326b213f61b1e633 Mon Sep 17 00:00:00 2001 From: Ihsan Topaloglu Date: Tue, 15 Sep 2020 03:42:04 -0400 Subject: [PATCH] fix: CORS configuration option --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 65d419b..51d3853 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,7 @@ var app = express(); // enable CORS (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) // so that your API is remotely testable by FCC var cors = require('cors'); -app.use(cors({optionSuccessStatus: 200})); // some legacy browsers choke on 204 +app.use(cors({optionsSuccessStatus: 200})); // some legacy browsers choke on 204 // http://expressjs.com/en/starter/static-files.html app.use(express.static('public')); @@ -29,4 +29,4 @@ app.get("/api/hello", function (req, res) { // listen for requests :) var listener = app.listen(process.env.PORT, function () { console.log('Your app is listening on port ' + listener.address().port); -}); \ No newline at end of file +});