refactor location blocks

This commit is contained in:
Brad Holland 2022-05-10 00:52:48 -04:00 committed by GitHub
commit d99cbfd10d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,18 +36,11 @@ server {
# The rules in this block are an adaptation of the rules
# in the Nextcloud `.htaccess` that concern `/.well-known`.
location /.well-known/carddav {
location ^/.well-known/(caldav|carddav) {
return 301 $scheme://$host/remote.php/dav;
}
# The rules in this block are an adaptation of the rules
# in the Nextcloud `.htaccess` that concern `/.well-known`.
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
# Let Nextcloud's API for `/.well-known` URIs handle all other
# Let Nextcloud's API for `/.well-known` URIs handle these
# requests by passing them to the front-end controller.
rewrite ^/.well-known/webfinger /index.php$uri redirect;
rewrite ^/.well-known/nodeinfo /index.php$uri redirect;
rewrite ^/.well-known/(webfinger|nodeinfo) /index.php$uri redirect;
}