Only run the AnonymousOptionsPlugion on Anonymous requests
Fixes #12744 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
a915594b03
commit
28474612e4
|
@ -50,7 +50,7 @@ class AnonymousOptionsPlugin extends ServerPlugin {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function handleAnonymousOptions(RequestInterface $request, ResponseInterface $response) {
|
public function handleAnonymousOptions(RequestInterface $request, ResponseInterface $response) {
|
||||||
if ($request->getMethod() === 'OPTIONS') {
|
if ($request->getHeader('Authorization') === null && $request->getMethod() === 'OPTIONS') {
|
||||||
/** @var CorePlugin $corePlugin */
|
/** @var CorePlugin $corePlugin */
|
||||||
$corePlugin = $this->server->getPlugin('core');
|
$corePlugin = $this->server->getPlugin('core');
|
||||||
// setup a fake tree for anonymous access
|
// setup a fake tree for anonymous access
|
||||||
|
|
Loading…
Reference in New Issue