diff --git a/conf/nginx.conf b/conf/nginx.conf index 1d6cd66..1ffdffd 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -41,7 +41,7 @@ location __PATH__/api { } } - location __PATH__/api/taskboard.db { - rewrite ^(.*)$ __PATH__/api/index.php last; break; +location __PATH__/api/taskboard.db { + rewrite ^(.*)$ __PATH__/api/index.php last; break; } \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index b25c350..d8ed784 100644 --- a/scripts/restore +++ b/scripts/restore @@ -32,8 +32,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " diff --git a/scripts/upgrade b/scripts/upgrade index 03e7730..f0a1834 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -45,6 +45,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Create a permission if needed +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================