modif cors to allow mobile to access

This commit is contained in:
2024-11-15 06:15:19 +01:00
parent 21effdf5be
commit ff74b2ff15
2 changed files with 8 additions and 2 deletions

View File

@@ -283,11 +283,13 @@ apxtri.runexpress = async (tribesdns, conf) => {
// let cor = false;
const regorigin = new RegExp(regtxt);
app.use((req, res, next) => {
/*if (req.headers.origin == undefined) {
let cor=false
if (req.headers.origin == undefined) {
//used for mobile access
cor = true;
} else {
cor = regorigin.test(req.headers.origin);
}*/
}
const cor=regorigin.test(req.headers.origin);
if (!cor)
console.log(