Skip to content

bug: nexcloud integration with subpaths do not work #3597

Description

@Meierschlumpf

Describe the bug

For example when having your nextcloud instance at https://example.com/nextcloud, the tsdav library is stripping away the /nextcloud path when calling the discovery url:

// variables that are passed arround
const accountType = 'basic';
const serviceUrl = 'https://example.com/nextcloud';

const endpoint = new URL(serverUrl); // endpoint.href -> https://example.com/nextcloud
const uri = new URL(`/.well-known/${accountType}`, endpoint); // uri.href -> https://example.com/.well-known/basic

Therfore if it makes the request to https://example.com/.well-known/basic it just gets a method not allowed back as it is supposed to call https://example.com/nextcloud/.well-known/basic

https://github.com/natelindev/tsdav/blob/03bc93dd8cd61d9b7777ca285cda37b024fe2443/src/account.ts#L14

Related https://discord.com/channels/972958686051962910/1392911840367083732

Steps to reproduce

  1. Host your nextcloud instance behind a subpath
  2. Try to add it as integration to homarr
  3. It doesn't work

Impact

Nextcloud integration behind subpaths do not work.
We suggest to use a proxy to forward from a domain to this subpath so homarr only sees a normal url (for example https://cloud.example.com)

Additional information

To fix this we'll probably have to do a fix upstream so it supports base paths

Version

1.26.0

Installation method

Docker Run

Browser

Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfirmedConfirmation that the bug actually exists

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions