diff --git a/docker/proxy/rootfs/etc/nginx/nginx.conf b/docker/proxy/rootfs/etc/nginx/nginx.conf --- a/docker/proxy/rootfs/etc/nginx/nginx.conf +++ b/docker/proxy/rootfs/etc/nginx/nginx.conf @@ -154,8 +154,9 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - location ~ ^/\\.well-known/(caldav|carddav)(.*)$ { - proxy_pass ROUNDCUBE_BACKEND; + location ~ ^/\.well-known/(caldav.*|carddav.*)$ { + proxy_pass DAV_BACKEND; + proxy_redirect http:// $scheme://; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/src/tests/Infrastructure/DavTest.php b/src/tests/Infrastructure/DavTest.php --- a/src/tests/Infrastructure/DavTest.php +++ b/src/tests/Infrastructure/DavTest.php @@ -249,18 +249,7 @@ */ public function testOptions(): void { - $body = << - - - - - - - - EOF; - - $response = $this->client->request('OPTIONS', "principals/{$this->user->email}", ['body' => $body]); + $response = $this->client->request('OPTIONS', "principals/{$this->user->email}"); $this->assertEquals(200, $response->getStatusCode()); $this->assertStringContainsString('PROPFIND', implode(', ', $response->getHeader('Allow'))); @@ -304,7 +293,7 @@ $this->assertEquals(207, $response->getStatusCode()); // Any URL should result in a redirect to the same path - $url = $this->isCyrus ? "/user/{$email}" : "/calendars/{$email}"; + $url = $this->isCyrus ? "user/{$email}" : "calendars/{$email}"; $response = $this->client->request('PROPFIND', "/.well-known/caldav/{$url}", $params); $this->assertEquals(301, $response->getStatusCode());