extend anonymous options to work on every dav url
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
75c3737054
commit
ffd7778040
|
@ -50,7 +50,7 @@ class AnonymousOptionsPlugin extends ServerPlugin {
|
|||
* @return bool
|
||||
*/
|
||||
public function handleAnonymousOptions(RequestInterface $request, ResponseInterface $response) {
|
||||
if ($request->getMethod() === 'OPTIONS' && $request->getPath() === '') {
|
||||
if ($request->getMethod() === 'OPTIONS') {
|
||||
/** @var CorePlugin $corePlugin */
|
||||
$corePlugin = $this->server->getPlugin('core');
|
||||
// setup a fake tree for anonymous access
|
||||
|
|
|
@ -54,7 +54,7 @@ class AnonymousOptionsTest extends TestCase {
|
|||
public function testAnonymousOptionsNonRoot() {
|
||||
$response = $this->sendRequest('OPTIONS', 'foo');
|
||||
|
||||
$this->assertEquals(401, $response->getStatus());
|
||||
$this->assertEquals(200, $response->getStatus());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue