Goal: Serve a specific sub directory of a domain from a different CDN (cloudfront in our case). We are thinking of utilizing Nginx as a reverse proxy to achieve this.
For example, the following location setting in Nginx, will serve the path /new-users/ from CloudFront.
location /new-users/ {
proxy_pass https://*****.cloudfront.net/;
}
My question is, will this reverse proxy setup completely negate the benefit of CDN?.
For instance, a user is accessing the site www.domain.com/new-users/ from location A, that request will go to Nginx (placed in location B), then Nginx will be retrieving the content from cloudfront edge closer to location B, rather than Location A, where the customer is.