mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-31 18:46:02 +00:00
Restrict the OPTIONS response on the root.
This commit is contained in:
parent
ee43bf9b9b
commit
bdc9c1a875
@ -11,7 +11,7 @@
|
||||
dbg_error_log("OPTIONS", "method handler");
|
||||
|
||||
if ( ! $request->AllowedTo('read') ) {
|
||||
$request->DoResponse( 403, translate("You may not access that calendar") );
|
||||
$request->DoResponse( 403, translate("You may not access that collection") );
|
||||
}
|
||||
|
||||
$exists = false;
|
||||
@ -55,6 +55,10 @@ if ( isset($c->override_allowed_methods) )
|
||||
$allowed = $c->override_allowed_methods;
|
||||
else {
|
||||
$allowed = "OPTIONS, GET, HEAD, PUT, DELETE, PROPFIND, MKCOL, MKCALENDAR, LOCK, UNLOCK, REPORT, PROPPATCH";
|
||||
if ( $request->path == '/' ) {
|
||||
$exists = true;
|
||||
$allowed = "OPTIONS, GET, HEAD, PROPFIND, REPORT";
|
||||
}
|
||||
}
|
||||
header( "Allow: $allowed");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user