Skip to content

Commit

Permalink
Merge pull request #21 from decentraland/feat/cors
Browse files Browse the repository at this point in the history
feat: hardcode methods
  • Loading branch information
juanmahidalgo authored Nov 26, 2024
2 parents becc02f + 8598fa4 commit df6c7d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ export async function initComponents(): Promise<AppComponents> {
console.log('corsString: ', corsString)
console.log('validCORSJsonString: ', validCORSJsonString)
console.log('JSON.parse(validCORSJsonString): ', JSON.parse(validCORSJsonString))
console.log('hardcoding cors')

const cors = {
origin: (await config.requireString('CORS_ORIGIN')).split(';').map(origin => new RegExp(origin)),
methods: JSON.parse(validCORSJsonString),
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
credentials: true
}

Expand Down

0 comments on commit df6c7d0

Please sign in to comment.