allow port in cors
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user