allow port in cors

This commit is contained in:
2026-02-26 14:11:26 +01:00
parent bfd9da14ab
commit fd13b21329

View File

@@ -347,7 +347,8 @@ apxtri.runexpress = async (tribesdns, conf) => {
app.use((req, res, next) => {
const origin = req.headers.origin;
if (origin && !regorigin.test(origin)) {
return res.status(403).json({ error: 'CORS not allowed' });
console.log(`CORS blocked: ${origin}`);
return res.status(403).json({ error: 'CORS not allowed', origin });
}
next();
});