Resolve issues behind reverse proxy

Nextcloud version (eg, 20.0.5): 27.0.0
Operating system and version (eg, Ubuntu 20.04): Debian 12 + Debian 11
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.57 + nginx 1.18.0
PHP version (eg, 7.4): 8.2 + N/A

The issue you are facing:
We’ve just stood up a new Nextcloud server on Debian 12 which is working fine when connecting from the internal network but the issue we are seeing now is for external access.
External access is via an Nginx reverse proxy which is running on a separate Debian 11 system.
Going into the administration page, there were initially several errors.
Adding the ‘trusted_proxy’ into the next cloud config cleared down one issue
I cleared down the resolve error for carddav and caldav by adding the entries below to the reverse proxy config.
Adding the same entries for the caldav and webfinger has not cleared the problem.
Can anyone give me a clue as to what I’m missing with the syntax

server {
	server_name goat-lovin.kink;
	access_log /var/log/nginx/access.log upstream_log;
	location / {
		proxy_pass https://xxx.xxx.xxx.xxx:443;
		include /etc/nginx/proxy_params;
	}
	location ~ /.well-known/carddav {
    	return 301 $scheme://$host/remote.php/dav;
	}
	location ~ /.well-known/caldav {
    	return 301 $scheme://$host/remote.php/dav;
	}
	location ~ /.well-known/webfinger {
		return 301 $scheme://$host/index.php/.well-known/webfinger;
	}
	location ~ /.well-known/nodeinfo {
		return 301 $scheme://$host/index.php/.well-known/nodeinfo;
	}
	location ~ /.well-known { 
        allow all; 
                proxy_pass http://xxx.xxx.xxx.xxx; 
        proxy_http_version 1.1; 
    }