From a278cdf26f067f5714cfce5920a3fcbcac055155 Mon Sep 17 00:00:00 2001 From: philc Date: Wed, 20 Nov 2024 16:01:16 +0100 Subject: [PATCH] modif setup --- apxtri/apxtri.js | 3 ++- apxtri/routes/wwws.js | 6 +++--- apxtri/setup/nginx.wwwscf | 5 ++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apxtri/apxtri.js b/apxtri/apxtri.js index 5142ddf..87bc65f 100755 --- a/apxtri/apxtri.js +++ b/apxtri/apxtri.js @@ -280,10 +280,11 @@ apxtri.runexpress = async (tribesdns, conf) => { regtxt += `|${d.replace(/\./g, "\\.")}`; }); regtxt+=")$" -// let cor = false; +// let cor = false;whatwg-url const regorigin = new RegExp(regtxt); app.use((req, res, next) => { let cor=false + //console.log(req.headers) if (req.headers.origin == undefined) { //used for mobile access cor = true; diff --git a/apxtri/routes/wwws.js b/apxtri/routes/wwws.js index da75ba0..6c43ec6 100644 --- a/apxtri/routes/wwws.js +++ b/apxtri/routes/wwws.js @@ -67,9 +67,9 @@ router.get( "/updatelocaldbanonymous/:tribe/:appname/:pagename/:version", checkHeaders, (req, res) => { - console.log("pass localstorage anonymous", req.session.header.xalias); - req.session.header.xprofils = ["anonymous"]; - console.log(req.session.header.xprofils); + //console.log("pass localstorage anonymous", req.session.header.xalias); + //req.session.header.xprofils = ["anonymous"]; + //console.log(req.session.header); //ajouter une detection de changement const getlocal = Wwws.initlocaldata( req.params.tribe, diff --git a/apxtri/setup/nginx.wwwscf b/apxtri/setup/nginx.wwwscf index 9a2ac11..e650d88 100644 --- a/apxtri/setup/nginx.wwwscf +++ b/apxtri/setup/nginx.wwwscf @@ -28,7 +28,7 @@ location /setup.sh { } location ~ ^/([^/]+)/setup.*\.tar\.gz$ { rewrite ^/([^/]+)/(setup.*\.tar\.gz)$ /$1/backups/$2 break; - root /home/phil/apxtowns/testwall-ants/; + root {{{townpath}}}/; } location ~* /objectimg/.*/img/ { rewrite /objectimg/(.*) /$1 break; @@ -54,6 +54,9 @@ location /socket/ { proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } +location = /apidoc { + return 301 /apidoc/; +} location /apidoc/ { root {{{townpath}}}/{{{tribeId}}}/objects/wwws/apidoc; index index.html;