Skip to content

Commit

Permalink
Only catch anonymous OPTIONS for Office
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Apr 24, 2020
1 parent 84a3536 commit 18d7ecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function handleAnonymousOptions(RequestInterface $request, ResponseInterf
$emptyAuth = $request->getHeader('Authorization') === null
|| $request->getHeader('Authorization') === ''
|| trim($request->getHeader('Authorization')) === 'Bearer';
$isAnonymousOption = $request->getMethod() === 'OPTIONS' && $emptyAuth;
$isAnonymousOption = $request->getMethod() === 'OPTIONS' && $isOffice && $emptyAuth;
$isOfficeHead = $request->getMethod() === 'HEAD' && $isOffice && $emptyAuth;
if ($isAnonymousOption || $isOfficeHead) {
/** @var CorePlugin $corePlugin */
Expand Down

0 comments on commit 18d7ecf

Please sign in to comment.