modif cors to allow mobile to access
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user