Skip to content

Commit

Permalink
feat: debug CORS issue
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmahidalgo committed Nov 26, 2024
1 parent dbaa87e commit a80f3b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export async function initComponents(): Promise<AppComponents> {
})
const corsString = await config.requireString('CORS_METHODS')
const validCORSJsonString = corsString.replace(/'/g, '"')
console.log('corsString: ', corsString)
console.log('validCORSJsonString: ', validCORSJsonString)
console.log('JSON.parse(validCORSJsonString): ', JSON.parse(validCORSJsonString))

const cors = {
origin: (await config.requireString('CORS_ORIGIN')).split(';').map(origin => new RegExp(origin)),
Expand Down

0 comments on commit a80f3b5

Please sign in to comment.