Skip to content

Commit 4e5644b

Browse files
committed
Use comma separated list of origins
Signed-off-by: Kipchirchir Sigei <[email protected]>
1 parent 0cac1e6 commit 4e5644b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async function build() {
8888
})
8989

9090
// CORS
91-
fastify.register(require('@fastify/cors'), { origin: typeof process.env.CORS_ORIGIN === 'string' ? JSON.parse(process.env.CORS_ORIGINS) : process.env.CORS_ORIGINS })
91+
fastify.register(require('@fastify/cors'), { origin: typeof process.env.CORS_ORIGIN === 'string' ? process.env.CORS_ORIGINS.split(",") : process.env.CORS_ORIGINS })
9292

9393
// OPTIONAL RATE LIMITER
9494
if ("RATE_MAX" in process.env) {

0 commit comments

Comments
 (0)