mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Merge pull request #162 from chexxor/patch-1
Add "/api/" to "skipped_uris".
This commit is contained in:
commit
5abb40d5b0
2 changed files with 12 additions and 0 deletions
|
@ -184,6 +184,8 @@ ynh_systemd_action --service_name=$app --action=restart
|
|||
ynh_script_progression --message="Configuring permissions..."
|
||||
|
||||
[ $is_public -eq 1 ] && ynh_permission_update --permission="main" --add="visitors"
|
||||
# Allow the web UI to use its own API without Yunohost/SSOWat interfering with it. Home Assistant authentication should still be in effect.
|
||||
ynh_permission_create --permission="api" --label="api" --url="/api" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
|
@ -31,6 +31,16 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# Create a permission if needed
|
||||
if ! ynh_permission_exists --permission="api"; then
|
||||
ynh_permission_create --permission="api" --label="api" --url="/api" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue