From 9c82e44ccab5206ce0fb427b19f4f7311e09f53b Mon Sep 17 00:00:00 2001 From: me Date: Fri, 14 Mar 2025 10:57:47 +0200 Subject: [PATCH] limit cors --- backend/main.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/main.mjs b/backend/main.mjs index f8d908c..deac402 100644 --- a/backend/main.mjs +++ b/backend/main.mjs @@ -78,7 +78,13 @@ app.use( }) ); app.use(morgan('combined')); -app.use(cors()); + +const corsOptions = { + origin: ['https://alloca.space', 'https://www.alloca.space'], + optionsSuccessStatus: 200 +}; + +app.use(cors(corsOptions)); // POST const limiter20 = RateLimit({