From 86c9dd3f99f8e9c752a703a0cb95b1b3fc01392c Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sat, 21 Oct 2023 15:37:16 +0100 Subject: [PATCH] test: add `u` unicode flag to regex --- test/cors.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cors.test.js b/test/cors.test.js index fa53e1f..8819277 100644 --- a/test/cors.test.js +++ b/test/cors.test.js @@ -709,7 +709,7 @@ test('Allow only request from a specific origin using regex', t => { t.plan(8) const fastify = Fastify() - fastify.register(cors, { origin: /(example|other)\.com/gi }) + fastify.register(cors, { origin: /(?:example|other)\.com/giu }) fastify.get('/', (req, reply) => { reply.send('ok')