Corrected CORS configuration option

This commit is contained in:
Ihsan Topaloglu 2020-09-19 00:03:40 -04:00 committed by GitHub
parent 335dc49102
commit ad618b45b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'));