modif setup

This commit is contained in:
philc 2024-11-20 16:01:16 +01:00
parent ecdafbe0ea
commit a278cdf26f
3 changed files with 9 additions and 5 deletions

View File

@ -280,10 +280,11 @@ apxtri.runexpress = async (tribesdns, conf) => {
regtxt += `|${d.replace(/\./g, "\\.")}`; regtxt += `|${d.replace(/\./g, "\\.")}`;
}); });
regtxt+=")$" regtxt+=")$"
// let cor = false; // let cor = false;whatwg-url
const regorigin = new RegExp(regtxt); const regorigin = new RegExp(regtxt);
app.use((req, res, next) => { app.use((req, res, next) => {
let cor=false let cor=false
//console.log(req.headers)
if (req.headers.origin == undefined) { if (req.headers.origin == undefined) {
//used for mobile access //used for mobile access
cor = true; cor = true;

View File

@ -67,9 +67,9 @@ router.get(
"/updatelocaldbanonymous/:tribe/:appname/:pagename/:version", "/updatelocaldbanonymous/:tribe/:appname/:pagename/:version",
checkHeaders, checkHeaders,
(req, res) => { (req, res) => {
console.log("pass localstorage anonymous", req.session.header.xalias); //console.log("pass localstorage anonymous", req.session.header.xalias);
req.session.header.xprofils = ["anonymous"]; //req.session.header.xprofils = ["anonymous"];
console.log(req.session.header.xprofils); //console.log(req.session.header);
//ajouter une detection de changement //ajouter une detection de changement
const getlocal = Wwws.initlocaldata( const getlocal = Wwws.initlocaldata(
req.params.tribe, req.params.tribe,

View File

@ -28,7 +28,7 @@ location /setup.sh {
} }
location ~ ^/([^/]+)/setup.*\.tar\.gz$ { location ~ ^/([^/]+)/setup.*\.tar\.gz$ {
rewrite ^/([^/]+)/(setup.*\.tar\.gz)$ /$1/backups/$2 break; rewrite ^/([^/]+)/(setup.*\.tar\.gz)$ /$1/backups/$2 break;
root /home/phil/apxtowns/testwall-ants/; root {{{townpath}}}/;
} }
location ~* /objectimg/.*/img/ { location ~* /objectimg/.*/img/ {
rewrite /objectimg/(.*) /$1 break; rewrite /objectimg/(.*) /$1 break;
@ -54,6 +54,9 @@ location /socket/ {
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade; proxy_cache_bypass $http_upgrade;
} }
location = /apidoc {
return 301 /apidoc/;
}
location /apidoc/ { location /apidoc/ {
root {{{townpath}}}/{{{tribeId}}}/objects/wwws/apidoc; root {{{townpath}}}/{{{tribeId}}}/objects/wwws/apidoc;
index index.html; index index.html;