Merge pull request #12808 from nextcloud/fix/12774/anonymous_options_only_anoynoums
Only run the AnonymousOptionsPlugion on Anonymous requests
This commit is contained in:
commit
43cb51d374
|
@ -50,7 +50,7 @@ class AnonymousOptionsPlugin extends ServerPlugin {
|
|||
* @return bool
|
||||
*/
|
||||
public function handleAnonymousOptions(RequestInterface $request, ResponseInterface $response) {
|
||||
if ($request->getMethod() === 'OPTIONS') {
|
||||
if ($request->getHeader('Authorization') === null && $request->getMethod() === 'OPTIONS') {
|
||||
/** @var CorePlugin $corePlugin */
|
||||
$corePlugin = $this->server->getPlugin('core');
|
||||
// setup a fake tree for anonymous access
|
||||
|
|
Loading…
Reference in New Issue