From 652f5c50ae53c69dfbf4ad87aa4b4ac166714ffc Mon Sep 17 00:00:00 2001 From: Juanma Hidalgo Date: Tue, 26 Nov 2024 18:20:38 +0100 Subject: [PATCH 1/2] feat: hardcode methods --- src/components.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components.ts b/src/components.ts index 7f713e2..ae5443a 100644 --- a/src/components.ts +++ b/src/components.ts @@ -22,7 +22,7 @@ export async function initComponents(): Promise { 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 } From 8598fa4bbad23e207612b2af7237c169bce86fa3 Mon Sep 17 00:00:00 2001 From: Juanma Hidalgo Date: Tue, 26 Nov 2024 18:22:48 +0100 Subject: [PATCH 2/2] feat: add log --- src/components.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components.ts b/src/components.ts index ae5443a..ff7f2fc 100644 --- a/src/components.ts +++ b/src/components.ts @@ -19,6 +19,7 @@ export async function initComponents(): Promise { 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)),