1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/domoticz_ynh.git synced 2024-09-03 18:26:17 +02:00

Merge pull request #20 from YunoHost-Apps/change_authheader

Change authheader
This commit is contained in:
Krakinou 2023-08-07 23:30:35 +02:00 committed by GitHub
commit 366b2f05eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 3 deletions

View file

@ -127,7 +127,7 @@ allow ::/1;
This will authorized only IPv4 within local network to access your domoticz API. This will authorized only IPv4 within local network to access your domoticz API.
You may add individual IPv6 address in the same way. You may add individual IPv6 address in the same way.
**Shipped version:** 2020.2~ynh7 **Shipped version:** 2020.2~ynh8
## Disclaimers / important information ## Disclaimers / important information

View file

@ -127,7 +127,7 @@ Ceci autorisera seulement les adresses IPv4 local a accéder aux API de domoticz
Vous pouvez ajouter des adresses IPv6 de la même façon. Vous pouvez ajouter des adresses IPv6 de la même façon.
**Version incluse :** 2020.2~ynh7 **Version incluse :** 2020.2~ynh8
## Avertissements / informations importantes ## Avertissements / informations importantes

View file

@ -6,7 +6,7 @@
"en": "Home automation system that lets you monitor and configure miscellaneous devices", "en": "Home automation system that lets you monitor and configure miscellaneous devices",
"fr": "Logiciel de domotique qui vous permet de configurer un grand nombre d'appareils" "fr": "Logiciel de domotique qui vous permet de configurer un grand nombre d'appareils"
}, },
"version": "2020.2~ynh7", "version": "2020.2~ynh8",
"url": "https://www.domoticz.com", "url": "https://www.domoticz.com",
"upstream": { "upstream": {
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",

View file

@ -257,8 +257,12 @@ then
# Everyone can access the app. # Everyone can access the app.
# The "main" permission is automatically created before the install script. # The "main" permission is automatically created before the install script.
ynh_permission_update --permission="main" --add="visitors" ynh_permission_update --permission="main" --add="visitors"
fi fi
#remove the authentication header preventing login from 2023.2 and 11.2.3 onward
ynh_permission_url --permission="main" --auth_header=false
#API & MQTT should stay publicly accessible. #API & MQTT should stay publicly accessible.
ynh_permission_create --permission="domoticz_API" --label="api" --url="$domain$api_path" --allowed="visitors" --show_tile="false" --protected="true" ynh_permission_create --permission="domoticz_API" --label="api" --url="$domain$api_path" --allowed="visitors" --show_tile="false" --protected="true"
[[ ! -z "$mqtt_domain" ]] && ynh_permission_create --permission="domoticz_MQTT" --label="MQTT" --url="$mqtt_domain" --allowed="visitors" --show_tile="false" --protected="true" [[ ! -z "$mqtt_domain" ]] && ynh_permission_create --permission="domoticz_MQTT" --label="MQTT" --url="$mqtt_domain" --allowed="visitors" --show_tile="false" --protected="true"

View file

@ -152,6 +152,9 @@ if [ -d "/var/log/$app/$app" ]; then
ynh_secure_remove "/var/log/$app/$app" ynh_secure_remove "/var/log/$app/$app"
fi fi
#remove the authentication header preventing login from 2023.2 and 11.2.3 onward
ynh_permission_url --permission="main" --auth_header=false
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================