I currently have a Nextcloud installation running on a server at home behind an Nginx proxy, which in turn is routed through Cloudflare. The proxy currently presents a Cloudflare origin SSL certificate to perform authenticated pulls from Cloudflare.
My question is: can Nginx, depending upon what IP is sending a request, serve different SSL certificates? I'd like to serve the Cloudflare origin SSL certificate when a Cloudflare IP sends a request, serve a Let's Encrypt certificate if an internal IP send a request, and block the request otherwise. The reasoning for wanting to do this is purely from a speed perspective, as my upload speed through my ISP is quite slow.
Perhaps there are very good reasons not to this — in which case I'd love to hear why this may be such a bad idea!
Many thanks in advance.