This commit is contained in:
seb
2026-10-08 16:11:47 +02:00
parent c2d3cdb088
commit 8111c3f377
10 changed files with 190 additions and 11 deletions

View File

@@ -74,7 +74,7 @@ function corsMiddleware(req, res, next) {
if (req.path.startsWith('/api/public') || req.path.startsWith('/public')) {
res.setHeader('Access-Control-Allow-Origin', origin || '*');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
res.setHeader('Access-Control-Allow-Methods', 'GET,OPTIONS');
res.setHeader('Access-Control-Allow-Methods', 'GET,POST,OPTIONS');
if (req.method === 'OPTIONS') {
return res.sendStatus(204);
}