Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(settings): make trailing slash for caldav/carddav redirects optional
#43939 moved the CalDAV/CardDAV redirect checks from the frontend to a new backend API. Since the backend does not send an authentication header, checking for the expected response code 207 of the DAV endpoint does not work anymore, hence the URL of the last redirect is checked instead. This URL is expected to contain a trailing slash, which was not required before, since the DAV endpoint works properly without it (when authenticated). While a trailing slash in the redirect does no harm, it causes many setups to throw an admin panel warning, while in fact the redirects work properly. Furthermore, the proposed "/.well-known/carddav" => "/remote.php/dav/" redirect leads to double slashes, when doing a request to "/.well-known/carddav/", which seems more wrong then right. This change makes the trailing slash optional, hence old and adjusted setups won't throw the warning anymore, and the DAV endpoint works well in both cases. Signed-off-by: MichaIng <micha@dietpi.com>
- Loading branch information