0

I'm testing out the CloudFront CDN but noticed that it will load the complete site. Is there a way to only allow the CDN to serve request that start with /media/* ?

I created a seperate behavior but won't let me delete the default one.

The other option is to provide a 404 from the website. But I rather the CDN handle those request.

enter image description here

Richard Dev
  • 219
  • 2
  • 11

1 Answers1

1

Depends on what exactly you are trying to do, but you could set the origin path to /media

user397836
  • 26
  • 2
  • the problem I run into with that is it then will make my request origin-domain.com/media now origin-domain.com/media/media – Richard Dev Jul 27 '17 at 16:25
  • Thanks for leading me to a solution. I ended up creating /cdn origin and then updated the code to respond correctly. – Richard Dev Jul 27 '17 at 17:05