YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
147 stars 63 forks source link

"api url" didn't changed when moving domain #626

Closed Martin-bl closed 8 months ago

Martin-bl commented 10 months ago

After changing url the api url wasn't changed

* I think that the [change_url](scripts/change_url) is not complete but maybe not : I didn't tried again to reproduce it.
* Note : I solved the problem for myself, so I'll report it here if it helps improve the package or helps others

### Context

- Hardware: *VPS bought online *
- YunoHost version: 11.2.5 (but I don't know what the version was when the url was changed)
- I have access to my server: *Through SSH*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no*

### Steps to reproduce

- *Change nextcloud url* (I don't know more about what was done exactly)

### Expected behavior

*The api url should also have changed but it remains on the last url*

### Logs

I have no history of this action. I started working on the server after the action had been performed. I've just seen that it wasn't done correctly

### To resolve
Actions to resolve the problem :   

source /usr/share/yunohost/helpers cat /etc/yunohost/apps/nextcloud/settings.yml new_domain=new_domain.tld url="re:$new_domain\/.well-known\/.*" app=nextcloud

ynh_permission_url --permission "api" --clear_urls ynh_permission_url --permission "api" --url="$url" --auth_header="false"


### Suggestion

Add this part to [change_url](scripts/change_url)

=================================================

CHANGE API URL SSOWAT

=================================================

ynh_permission_url --permission "api" --clear_urls ynh_permission_url --permission "api" --url="$url" --auth_header="false"



The following didn't work for me : 
`ynh_permission_url --permission "api" --add_url="$new_domain" --remove_url="$old_domain" --auth_header="false" `
ericgaspar commented 8 months ago

This should be fixed with #622. Please confirm

alexAubin commented 8 months ago

No feedback, assuming this is fixed