Merge pull request #12638 from nextcloud/backport/12556/stable15
[stable15] extend anonymous options to work on every dav url
This commit is contained in:
commit
ca7c56116f
|
@ -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