Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Enable cors for api/walkin/profile route #19

Merged
merged 1 commit into from
Oct 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/server/routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ module.exports = function (router) {
/**
* Create a walkin user and updates user's profile.
*/
router.post('/walkin/profile', isValidSecret, (req, res) => {
router.options('/walkin/profile', cors());
router.post('/walkin/profile', cors(), isValidSecret, (req, res) => {
console.log('Creating new walk-in user.');

// create a new user and updates its fields
Expand Down