Skip to content

Commit 35ebc65

Browse files
authored
test(cors): add missing anchor (#357)
* test(cors): add missing anchor Stops CodeQL Code Scanning from complaining Signed-off-by: Frazer Smith <[email protected]> * test(cors): missing trailing slash --------- Signed-off-by: Frazer Smith <[email protected]>
1 parent 6dabadb commit 35ebc65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/cors.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ test('Allow only request from a specific origin using regex', async t => {
789789
t.plan(8)
790790

791791
const fastify = Fastify()
792-
fastify.register(cors, { origin: /(?:example|other)\.com/giu })
792+
fastify.register(cors, { origin: /(?:example|other)\.com\/?$/giu })
793793

794794
fastify.get('/', (_req, reply) => {
795795
reply.send('ok')

0 commit comments

Comments
 (0)