Skip to content

Commit

Permalink
Update BAP duplicates API call to enable preflight requests, since us…
Browse files Browse the repository at this point in the history
…ing a custom header makes it a complex request
  • Loading branch information
courtneymyers committed Apr 5, 2024
1 parent f05189f commit 36c4432
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/server/app/routes/bap.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const { FORMIO_DUPLICATES_API_KEY } = process.env;
const router = express.Router();

// --- check for duplicate contacts or organizations in the BAP.
router.options("/duplicates", cors()); // enable pre-flight request
router.post("/duplicates", cors(), (req, res) => {
const apiKey = req.headers["x-api-key"];

Expand Down

0 comments on commit 36c4432

Please sign in to comment.