Skip to content

Commit

Permalink
fix: add split to cors set up
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Apr 19, 2024
1 parent cfb2f57 commit ef963aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export async function initComponents(): Promise<AppComponents> {
)

const cors = {
origin: await config.getString('CORS_ORIGIN'),
origin: (await config.requireString('CORS_ORIGIN'))
.split(';')
.map((origin) => new RegExp(origin)),
method: await config.getString('CORS_METHOD'),
}

Expand Down

0 comments on commit ef963aa

Please sign in to comment.