Limit the .well-known locations we respond to

Some people want to have DAViCal sharing the same vhost as other services
which also have .well-known paths. We should only respond to the ones we
should respond to.
This commit is contained in:
Andrew Ruthven 2024-01-19 00:39:55 +13:00 committed by Andrew Ruthven
parent 11a57a85c6
commit cc9ead0fc9
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ Alias /davical /usr/share/davical/htdocs
# PT is important if you are using an alias, it implies L
# Redirect /.well-known URLs
RewriteRule ^/\.well-known/(.*)$ /davical/caldav.php/.well-known/$1 [NC,PT]
RewriteRule ^/\.well-known/(ischedule|caldav|carddav|timezone)$ /davical/caldav.php/.well-known/$1 [NC,PT]
# Optionally: redirect /principals/users/ as well
RewriteRule ^/principals/users/(.*)$ /davical/caldav.php/$1 [NC,PT]
RewriteRule ^/principals/resources/(.*)$ /davical/caldav.php/$1 [NC,PT]

View File

@ -20,7 +20,7 @@ Listen 127.0.1.1:80
RewriteEngine On
# Redirect /.well-known URLs
RewriteRule ^/\.well-known/(.*)$ /caldav.php/.well-known/$1 [NC,L]
RewriteRule ^/\.well-known/(ischedule|caldav|carddav|timezone)$ /caldav.php/.well-known/$1 [NC,L]
# and other special URLs
RewriteRule ^/principals/users/(.*)$ /caldav.php/$1 [NC,L]
RewriteRule ^/principals/resources/(.*)$ /caldav.php/$1 [NC,L]